spec/auth_token_spec.rb in cloudinary-1.8.2 vs spec/auth_token_spec.rb in cloudinary-1.8.3
- old
+ new
@@ -56,14 +56,14 @@
end
it "should raise if key is not provided" do
Cloudinary.config.auth_token[:key] = nil
token = { :expiration => 111111, :duration => 0 }
- expect{Cloudinary::Utils.generate_auth_token(token)}.to raise_error
+ expect{Cloudinary::Utils.generate_auth_token(token)}.to raise_error(/Missing auth token key configuration/)
end
it "should raise if expiration and duration are not provided" do
token = { :key => KEY, :expiration => 0, :duration => 0 }
- expect{Cloudinary::Utils.generate_auth_token(token)}.to raise_error
+ expect{Cloudinary::Utils.generate_auth_token(token)}.to raise_error(/Must provide either expiration or duration/)
end
end
describe "authentication token" do
it "should generate token string" do
user = "foobar" # we can't rely on the default "now" value in tests