features/step_definitions/dsl_steps.rb in conjur-cli-4.27.0 vs features/step_definitions/dsl_steps.rb in conjur-cli-4.28.0

- old
+ new

@@ -15,10 +15,14 @@ Then(/^the model should contain "(.*?)" \/(.*?)\/$/) do |kind, id| @mock_api.thing_like(kind, Regexp.new(id)).should_not be_nil end Then(/^the "(.*?)" "(.*?)" should be owned by "(.*?)"$/) do |kind, id, owner| step "the model should contain \"#{kind}\" \"#{id}\"" - @mock_api.thing(kind, id).ownerid.should == owner + if kind == 'role' || kind == 'resource' + @mock_api.thing(kind, id).acting_as.should == owner + else + @mock_api.thing(kind, id).ownerid.should == owner + end end Then(/^the "(.*?)" "(.*?)" should not have an owner$/) do |kind, id| step "the model should contain \"#{kind}\" \"#{id}\"" @mock_api.thing(kind, id).ownerid.should be_nil