blob: 28bd41dfdc8400d3b7b248b45ad485db908a1815 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
it 'is follow' do
expect(subject.verb).to be :follow
end
end
describe '#title' do
it 'describes the follow' do
expect(subject.title).to eql 'alice started following bob'
end
end
describe '#content' do
it 'is the same as the title' do
expect(subject.content).to eql subject.title
end
end
describe '#object_type' do
it 'is a person' do
expect(subject.object_type).to be :person
end
end
describe '#target' do
it 'is the person being followed' do
expect(subject.target).to eq bob
end
end
describe '#mentions' do
it 'is empty' do
expect(subject.mentions).to be_empty
end
end
end
|