From 48acca107b9bd7a59bacb1449b042eb753e63917 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 30 Mar 2016 17:06:32 -0700 Subject: api: return proper 404 for GET /1/identities/:id.json --- test/functional/v1/identities_controller_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/functional/v1') diff --git a/test/functional/v1/identities_controller_test.rb b/test/functional/v1/identities_controller_test.rb index 3e88402..6410c44 100644 --- a/test/functional/v1/identities_controller_test.rb +++ b/test/functional/v1/identities_controller_test.rb @@ -8,9 +8,13 @@ class V1::IdentitiesControllerTest < ActionController::TestCase get :show, :id => identity.address, :format => 'json' assert_response :success assert_equal identity, assigns(:identity) + + get :show, :id => "blahblahblah", :format => 'json' + assert_response :not_found end end + test "anonymous cannot fetch identity" do identity = FactoryGirl.create :identity get :show, :id => identity.address, :format => 'json' -- cgit v1.2.3