spec/td/client/result_api_spec.rb in td-client-0.8.62 vs spec/td/client/result_api_spec.rb in td-client-0.8.63

- old
+ new

@@ -24,31 +24,31 @@ stub_api_request(:post, "/v3/result/create/#{e(name)}").with(:body => params) .to_return(:status => 422, :body => {'message' => err_msg}.to_json) expect { api.create_result(name, result_url) - }.to raise_error(TreasureData::APIError, /^#{err_msg}/) + }.to raise_error(TreasureData::APIError, /#{err_msg}/) end it 'should return 422 error without url' do params = {'url' => 'false'} # I want to use nil, but nil doesn't work on WebMock... err_msg = "'url' parameter is required" stub_api_request(:post, "/v3/result/create/#{e(result_name)}").with(:body => params) .to_return(:status => 422, :body => {'message' => err_msg}.to_json) expect { api.create_result(result_name, false) - }.to raise_error(TreasureData::APIError, /^#{err_msg}/) + }.to raise_error(TreasureData::APIError, /#{err_msg}/) end it 'should return 409 error with duplicated name' do params = {'url' => result_url} err_msg = "Result must be unique" stub_api_request(:post, "/v3/result/create/#{e(result_name)}").with(:body => params) .to_return(:status => 409, :body => {'message' => err_msg}.to_json) expect { api.create_result(result_name, result_url) - }.to raise_error(TreasureData::APIError, /^#{err_msg}/) + }.to raise_error(TreasureData::APIError, /#{err_msg}/) end end end