remove controller test for proposals friendly urls
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe ProposalsController do
|
||||
|
||||
describe "GET show" do
|
||||
|
||||
let(:proposal) { create :proposal }
|
||||
|
||||
context "when path matches" do
|
||||
it "should not redirect to real path" do
|
||||
get :show, id: proposal.id
|
||||
expect(response).to_not redirect_to proposals_path(proposal)
|
||||
end
|
||||
end
|
||||
|
||||
context "when path does not match" do
|
||||
it "should redirect to real path" do
|
||||
expect(request).to receive(:path).exactly(3).times.and_return "/#{proposal.id}-something-else"
|
||||
get :show, id: proposal.id
|
||||
expect(response).to redirect_to proposal_path(proposal)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user