Fix test
This commit is contained in:
parent
a4cc73438e
commit
1771cb8cb4
1 changed files with 4 additions and 4 deletions
|
@ -1081,18 +1081,18 @@ RSpec.describe Account do
|
||||||
describe 'matches_display_name' do
|
describe 'matches_display_name' do
|
||||||
it 'matches display name which starts with the given string' do
|
it 'matches display name which starts with the given string' do
|
||||||
match = Fabricate(:account, display_name: 'pattern and suffix')
|
match = Fabricate(:account, display_name: 'pattern and suffix')
|
||||||
account = Fabricate(:account, display_name: 'prefix and pattern')
|
Fabricate(:account, display_name: 'prefix and pattern')
|
||||||
|
|
||||||
expect(described_class.matches_display_name('pattern')).to contain_exactly(match, account)
|
expect(described_class.matches_display_name('pattern')).to eq [match]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'matches_username' do
|
describe 'matches_username' do
|
||||||
it 'matches display name which starts with the given string' do
|
it 'matches display name which starts with the given string' do
|
||||||
match = Fabricate(:account, username: 'pattern_and_suffix')
|
match = Fabricate(:account, username: 'pattern_and_suffix')
|
||||||
account = Fabricate(:account, username: 'prefix_and_pattern')
|
Fabricate(:account, username: 'prefix_and_pattern')
|
||||||
|
|
||||||
expect(described_class.matches_username('pattern')).to contain_exactly(match, account)
|
expect(described_class.matches_username('pattern')).to eq [match]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue