mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Spec action verification of StreamEntryFinder (#3549)
This commit is contained in:
parent
19084d3c6c
commit
00e61d6807
1 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,14 @@ describe StreamEntryFinder do
|
||||||
it 'finds the stream entry' do
|
it 'finds the stream entry' do
|
||||||
expect(subject.stream_entry).to eq(status.stream_entry)
|
expect(subject.stream_entry).to eq(status.stream_entry)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'raises an error if action is not :show' do
|
||||||
|
recognized = Rails.application.routes.recognize_path(url)
|
||||||
|
expect(recognized).to receive(:[]).with(:action).and_return(:create)
|
||||||
|
expect(Rails.application.routes).to receive(:recognize_path).with(url).and_return(recognized)
|
||||||
|
|
||||||
|
expect { subject.stream_entry }.to raise_error(ActiveRecord::RecordNotFound)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a stream entry url' do
|
context 'with a stream entry url' do
|
||||||
|
|
Loading…
Reference in a new issue