Skip to content

Commit

Permalink
Fix specs for display/visible rename from core repo yesterday
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Oct 2, 2019
1 parent 2382951 commit f208564
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/requests/services_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,16 @@
{"action" => "remove", "path" => "description"},
{"action" => "add", "path" => "display", "value" => true}])

expect_single_resource_query("id" => svc.id.to_s, "name" => "updated svc1", "display" => true)
expect_single_resource_query("id" => svc.id.to_s, "name" => "updated svc1", "visible" => true)
expect(svc.reload.name).to eq("updated svc1")
expect(svc.description).to be_nil
expect(svc.display).to be_truthy
expect(svc.visible).to be_truthy
end

it "supports edits of single resource via a standard PATCH" do
api_basic_authorize collection_action_identifier(:services, :edit)

updated_service_attributes = { "name" => "updated svc1", "description" => nil, "display" => true }
updated_service_attributes = { "name" => "updated svc1", "description" => nil, "visible" => true }

patch(api_service_url(nil, svc), :params => updated_service_attributes)

Expand Down

0 comments on commit f208564

Please sign in to comment.