diff options
author | David Yip <yipdw@member.fsf.org> | 2017-11-16 22:52:37 -0600 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2017-11-16 22:52:37 -0600 |
commit | b28b405b9763a0bb3df653b51e6d084b42e9a54d (patch) | |
tree | c69f1ccb99440fea8cc94014e77687238e205160 /spec/models | |
parent | ee560abdbe7a2caf0f7ac6137faf248bbaff9a93 (diff) | |
parent | dc6e031364d1f47a49ea47f20070a4e9986a4c68 (diff) |
Merge remote-tracking branch 'origin/master' into gs-master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/remote_follow_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/status_spec.rb | 23 |
2 files changed, 22 insertions, 3 deletions
diff --git a/spec/models/remote_follow_spec.rb b/spec/models/remote_follow_spec.rb index 7a4597ee7..72c580f9f 100644 --- a/spec/models/remote_follow_spec.rb +++ b/spec/models/remote_follow_spec.rb @@ -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 diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb index 91fd13c94..89ad3adcf 100644 --- a/spec/models/status_spec.rb +++ b/spec/models/status_spec.rb @@ -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 |