Sha256: 57b5931f5d5a0271eeacd538fbb18e4fe0f8015918fad8581e2fd9e9b6c14491
Contents?: true
Size: 976 Bytes
Versions: 21
Compression:
Stored size: 976 Bytes
Contents
require File.join(File.dirname(__FILE__),'..','api_helper') describe "RhoconnectApiUpdateSourceParams" do it_should_behave_like "ApiHelper" do it "should set poll_interval to 99 seconds" do @s1 = Source.load(@s.id,@s_params) before = @s1.poll_interval.to_i put "/rc/#{Rhoconnect::API_VERSION}/sources/#{@s_fields[:name]}", {:data => {:poll_interval => 99}}, {Rhoconnect::API_TOKEN_HEADER => @api_token} last_response.should be_ok @s2 = Source.load(@s.id,@s_params) after = @s2.poll_interval before.should == 300 after.should == 99 end it "should fail to update the source if param is not found" do put "/rc/#{Rhoconnect::API_VERSION}/sources/#{@s_fields[:name]}", {:data => {:invalid_param => "invalid_data"}}, {Rhoconnect::API_TOKEN_HEADER => @api_token} last_response.status.should == 500 last_response.body.match('undefined method').should_not be_nil end end end
Version data entries
21 entries across 21 versions & 1 rubygems