mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
23 lines
559 B
Ruby
23 lines
559 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe StatusesSearchService do
|
|
describe '#call' do
|
|
let!(:status) { Fabricate(:status, text: 'status number one') }
|
|
let(:results) { subject.call('one', status.account, limit: 5) }
|
|
|
|
before { Fabricate(:status, text: 'status number two') }
|
|
|
|
context 'when elasticsearch is enabled', :search do
|
|
it 'runs a search for statuses' do
|
|
expect(results)
|
|
.to have_attributes(
|
|
size: 1,
|
|
first: eq(status)
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|