From 124ae8ada6eb0526c141aaccde53d8d5c0bd9be6 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 6 May 2015 12:01:47 +1000 Subject: [PATCH] correct spec --- spec/controllers/clicks_controller_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/controllers/clicks_controller_spec.rb b/spec/controllers/clicks_controller_spec.rb index 6a1db2d8309..18b9ad77958 100644 --- a/spec/controllers/clicks_controller_spec.rb +++ b/spec/controllers/clicks_controller_spec.rb @@ -5,8 +5,9 @@ describe ClicksController do context 'create' do context 'missing params' do - it 'raises an error without the url param' do - expect { xhr :get, :track, post_id: 123 }.to raise_error(ActionController::ParameterMissing) + it 'raises a 404 without the url param' do + xhr :get, :track, post_id: 123 + expect(response).to be_not_found end it "redirects to the url even without the topic_id or post_id params" do