Skip to content
Snippets Groups Projects
Commit 00e61d68 authored by Akihiko Odaki (@fn_aki@pawoo.net)'s avatar Akihiko Odaki (@fn_aki@pawoo.net) Committed by Eugen Rochko
Browse files

Spec action verification of StreamEntryFinder (#3549)

parent 19084d3c
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,14 @@ describe StreamEntryFinder do
it 'finds the stream entry' do
expect(subject.stream_entry).to eq(status.stream_entry)
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
context 'with a stream entry url' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment