From 2d2efbddfe643a0370f1d93bdb2db51ed1970ffb Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 5 Apr 2017 18:48:57 -0500 Subject: [PATCH] /iqdb_queries: add api test. --- test/functional/iqdb_queries_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/functional/iqdb_queries_controller_test.rb b/test/functional/iqdb_queries_controller_test.rb index a9dd869f1..2e6cba454 100644 --- a/test/functional/iqdb_queries_controller_test.rb +++ b/test/functional/iqdb_queries_controller_test.rb @@ -28,6 +28,13 @@ class IqdbQueriesControllerTest < ActionController::TestCase assert_response :success end + + should "render for a json response" do + mock_iqdb_matches!(@posts[0].source, @posts) + get :index, { url: @posts[0].source, format: "json" }, { user_id: @user.id } + + assert_response :success + end end end end