6414: Added an assertion to test if objects are equal.
authorManoj <jonam33@gmail.com>
Mon, 3 Aug 2015 18:52:02 +0000 (14:52 -0400)
committerManoj <jonam33@gmail.com>
Mon, 3 Aug 2015 18:52:02 +0000 (14:52 -0400)
apps/workbench/test/controllers/projects_controller_test.rb

index 51a4e37d4b75b9484f90027cf32e5da1c3575d85..afcba936adae6bf1f070ea65c61f2f9091ee70a1 100644 (file)
@@ -400,10 +400,11 @@ class ProjectsControllerTest < ActionController::TestCase
 
   test "visit a public project and verify the public projects page link exists" do
     Rails.configuration.anonymous_user_token = api_fixture('api_client_authorizations')['anonymous']['api_token']
-    get :show, {id: api_fixture('groups')['anonymously_accessible_project']['uuid']}
+    uuid = api_fixture('groups')['anonymously_accessible_project']['uuid']
+    get :show, {id: uuid}
     project = assigns(:object)
+    assert_equal uuid, project['uuid']
     refute_empty css_select("[href=\"/projects/#{project['uuid']}\"]")
     assert_includes @response.body, "<a href=\"/projects/public\">Public Projects</a>"
   end
-
 end