Merge remote-tracking branch 'origin/master' into gs-master

This commit is contained in:
David Yip
2017-11-16 22:52:37 -06:00
29 changed files with 136 additions and 72 deletions

View File

@@ -35,7 +35,7 @@ RSpec.describe RemoteFollow do
context 'attrs with acct' do
let(:attrs) { { acct: 'gargron@quitter.no' }}
it do
is_expected.to be true
end

View File

@@ -47,8 +47,27 @@ RSpec.describe Status, type: :model do
end
describe '#verb' do
it 'is always post' do
expect(subject.verb).to be :post
context 'if destroyed?' do
it 'returns :delete' do
subject.destroy!
expect(subject.verb).to be :delete
end
end
context 'unless destroyed?' do
context 'if reblog?' do
it 'returns :share' do
subject.reblog = other
expect(subject.verb).to be :share
end
end
context 'unless reblog?' do
it 'returns :post' do
subject.reblog = nil
expect(subject.verb).to be :post
end
end
end
end