spec/command/groups_spec.rb in conjur-cli-4.14.0 vs spec/command/groups_spec.rb in conjur-cli-4.15.0

- old
+ new

@@ -1,11 +1,11 @@ require 'spec_helper' describe Conjur::Command::Groups, logged_in: true do describe_command "group:members:add group user:alice" do it "adds the role to the group" do - RestClient::Request.should_receive(:execute).with( + expect(RestClient::Request).to receive(:execute).with( method: :put, url: "https://authz.example.com/the-account/roles/group/group/?members&member=user:alice", headers: {}, payload: nil ) @@ -13,22 +13,22 @@ end end describe_command "group:members:add -a group user:alice" do it "adds the role to the group with admin option" do - RestClient::Request.should_receive(:execute).with( + expect(RestClient::Request).to receive(:execute).with( method: :put, url: "https://authz.example.com/the-account/roles/group/group/?members&member=user:alice", headers: {}, payload: { admin_option: true } ) invoke end end describe_command "group:members:add -a group alice" do it "assumes that a nake member name is a user" do - RestClient::Request.should_receive(:execute).with( + expect(RestClient::Request).to receive(:execute).with( method: :put, url: "https://authz.example.com/the-account/roles/group/group/?members&member=user:alice", headers: {}, payload: { admin_option: true } ) @@ -36,10 +36,10 @@ end end describe_command "group:members:add -r group alice" do it "revokes the admin rights" do - RestClient::Request.should_receive(:execute).with( + expect(RestClient::Request).to receive(:execute).with( method: :put, url: "https://authz.example.com/the-account/roles/group/group/?members&member=user:alice", headers: {}, payload: { admin_option: false } )