spec/lib/api_spec.rb in conjur-api-4.19.1 vs spec/lib/api_spec.rb in conjur-api-4.20.0
- old
+ new
@@ -53,16 +53,16 @@
describe "#parse_id(id, kind)" do
subject { Conjur::API }
let (:kind) { "sample-kind" }
it "fails on non-string ids" do
- expect { subject.parse_id({}, kind) }.to raise_error
+ expect { subject.parse_id({}, kind) }.to raise_error /Unexpected class/
end
it "fails on malformed ids (<2 tokens)" do
- expect { subject.parse_id("foo", kind) }.to raise_error
- expect { subject.parse_id("", kind) }.to raise_error
- expect { subject.parse_id(nil, kind) }.to raise_error
+ expect { subject.parse_id("foo", kind) }.to raise_error /Expecting at least two /
+ expect { subject.parse_id("", kind) }.to raise_error /Expecting at least two /
+ expect { subject.parse_id(nil, kind) }.to raise_error /Unexpected class/
end
describe "returns array of [account, kind, subkind, id]" do
subject { Conjur::API.parse_id(id, kind) }
def escaped smth ; Conjur::API.path_escape(smth) ; end