Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: app/models/status.rb db/migrate/20180528141303_fix_accounts_unique_index.rb db/schema.rb Resolved by taking upstream changes (no real conflicts, just glitch-soc specific code too close to actual changes).
This commit is contained in:
@@ -48,17 +48,17 @@ describe Export do
|
||||
describe 'total_follows' do
|
||||
it 'returns the total number of the followed accounts' do
|
||||
target_accounts.each(&account.method(:follow!))
|
||||
expect(Export.new(account).total_follows).to eq 2
|
||||
expect(Export.new(account.reload).total_follows).to eq 2
|
||||
end
|
||||
|
||||
it 'returns the total number of the blocked accounts' do
|
||||
target_accounts.each(&account.method(:block!))
|
||||
expect(Export.new(account).total_blocks).to eq 2
|
||||
expect(Export.new(account.reload).total_blocks).to eq 2
|
||||
end
|
||||
|
||||
it 'returns the total number of the muted accounts' do
|
||||
target_accounts.each(&account.method(:mute!))
|
||||
expect(Export.new(account).total_mutes).to eq 2
|
||||
expect(Export.new(account.reload).total_mutes).to eq 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -37,4 +37,20 @@ RSpec.describe Follow, type: :model do
|
||||
expect(a[1]).to eq follow0
|
||||
end
|
||||
end
|
||||
|
||||
describe 'revoke_request!' do
|
||||
let(:follow) { Fabricate(:follow, account: account, target_account: target_account) }
|
||||
let(:account) { Fabricate(:account) }
|
||||
let(:target_account) { Fabricate(:account) }
|
||||
|
||||
it 'revokes the follow relation' do
|
||||
follow.revoke_request!
|
||||
expect(account.following?(target_account)).to be false
|
||||
end
|
||||
|
||||
it 'creates a follow request' do
|
||||
follow.revoke_request!
|
||||
expect(account.requested?(target_account)).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
5
spec/models/status_stat_spec.rb
Normal file
5
spec/models/status_stat_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe StatusStat, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Reference in New Issue
Block a user