|
|
@ -47,8 +47,27 @@ RSpec.describe Status, type: :model do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe '#verb' do |
|
|
|
describe '#verb' do |
|
|
|
it 'is always post' do |
|
|
|
context 'if destroyed?' do |
|
|
|
expect(subject.verb).to be :post |
|
|
|
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 |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|