# Conflicts:
#	app/controllers/settings/exports_controller.rb
#	app/models/media_attachment.rb
#	app/models/status.rb
#	app/views/about/show.html.haml
#	docker_entrypoint.sh
#	spec/views/about/show.html.haml_spec.rb
This commit is contained in:
imncls
2018-02-23 23:28:31 +09:00
100 changed files with 1395 additions and 422 deletions

View File

@@ -66,6 +66,28 @@ describe Api::V1::Accounts::RelationshipsController do
expect(json.second[:requested]).to be false
expect(json.second[:domain_blocking]).to be false
end
it 'returns JSON with correct data on cached requests too' do
get :index, params: { id: [simon.id] }
json = body_as_json
expect(json).to be_a Enumerable
expect(json.first[:following]).to be true
expect(json.first[:showing_reblogs]).to be true
end
it 'returns JSON with correct data after change too' do
user.account.unfollow!(simon)
get :index, params: { id: [simon.id] }
json = body_as_json
expect(json).to be_a Enumerable
expect(json.first[:following]).to be false
expect(json.first[:showing_reblogs]).to be false
end
end
end
end

View File

@@ -0,0 +1,3 @@
Fabricator(:backup) do
user
end

View File

@@ -34,4 +34,9 @@ class UserMailerPreview < ActionMailer::Preview
def welcome
UserMailer.welcome(User.first)
end
# Preview this email at http://localhost:3000/rails/mailers/user_mailer/backup_ready
def backup_ready
UserMailer.backup_ready(User.first, Backup.first)
end
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Backup, type: :model do
end

View File

@@ -18,6 +18,9 @@ describe 'about/show.html.haml', without_verify_partial_doubles: true do
source_url: 'https://github.com/tootsuite/mastodon',
open_registrations: false,
thumbnail: nil,
hero: nil,
user_count: 0,
status_count: 0,
closed_registrations_message: 'yes',
commit_hash: commit_hash)