diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-26 15:28:08 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-26 15:28:08 +0100 |
commit | f16b31f0773c2fd1122ff0ad98cb392e762f0d0b (patch) | |
tree | 24880b7ee107288e7acb540011281569e8502e96 /spec/models/follow_spec.rb | |
parent | 44c5958203dd8d0f96f880a8014a3233719077a6 (diff) |
Adding a bunch of tests
Diffstat (limited to 'spec/models/follow_spec.rb')
-rw-r--r-- | spec/models/follow_spec.rb | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/spec/models/follow_spec.rb b/spec/models/follow_spec.rb index edb084701..28bd41dfd 100644 --- a/spec/models/follow_spec.rb +++ b/spec/models/follow_spec.rb @@ -1,27 +1,44 @@ require 'rails_helper' RSpec.describe Follow, type: :model do + let(:alice) { Fabricate(:account, username: 'alice') } + let(:bob) { Fabricate(:account, username: 'bob') } + + subject { Follow.new(account: alice, target_account: bob) } + describe '#verb' do - pending + it 'is follow' do + expect(subject.verb).to be :follow + end end describe '#title' do - pending + it 'describes the follow' do + expect(subject.title).to eql 'alice started following bob' + end end describe '#content' do - pending + it 'is the same as the title' do + expect(subject.content).to eql subject.title + end end describe '#object_type' do - pending + it 'is a person' do + expect(subject.object_type).to be :person + end end describe '#target' do - pending + it 'is the person being followed' do + expect(subject.target).to eq bob + end end describe '#mentions' do - pending + it 'is empty' do + expect(subject.mentions).to be_empty + end end end |