From d6749566aa9b8e9eb4bcf69762f97f0a8f565a3c Mon Sep 17 00:00:00 2001 From: Aparna Karve Date: Tue, 10 Jan 2017 19:34:27 -0800 Subject: [PATCH] spec to test v_class attribute --- spec/requests/api/requests_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/requests/api/requests_spec.rb b/spec/requests/api/requests_spec.rb index e0fae5103a0..2014193ee63 100644 --- a/spec/requests/api/requests_spec.rb +++ b/spec/requests/api/requests_spec.rb @@ -246,13 +246,17 @@ request.add_tag(t.name, t.children.first.name) api_basic_authorize action_identifier(:requests, :read, :resource_actions, :get) - run_get requests_url(request.id), :attributes => "workflow,v_allowed_tags" + run_get requests_url(request.id), :attributes => "workflow,v_allowed_tags,v_class" expected_workflow = a_hash_including("id" => request.id, "workflow" => a_hash_including("values")) expected_tags = a_hash_including("id" => request.id, "v_allowed_tags" => [a_hash_including("children")]) + expected_class = a_hash_including( + "id" => request.id, + "v_class" => {"instance_logger" => a_hash_including("klass" => request.workflow.class.to_s)}) expect(response.parsed_body).to match(expected_workflow) expect(response.parsed_body).to match(expected_tags) + expect(response.parsed_body).to match(expected_class) expect(response).to have_http_status(:ok) end end