summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-30 17:06:32 -0700
committerelijah <elijah@riseup.net>2016-03-30 17:06:32 -0700
commit48acca107b9bd7a59bacb1449b042eb753e63917 (patch)
treece8bee7d2fa4007a1db9815e1af001fe44e329c1 /test/functional
parentbd5ffce445fd91eac32ac1309297e7e3cf05ead8 (diff)
api: return proper 404 for GET /1/identities/:id.json
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/v1/identities_controller_test.rb4
1 files changed, 4 insertions, 0 deletions
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'