test/fastly/token_test.rb in fastly-2.5.0 vs test/fastly/token_test.rb in fastly-2.5.1

- old
+ new

@@ -19,11 +19,11 @@ 'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Accept'=>'application/json', 'Content-Type'=>'application/x-www-form-urlencoded', 'Cookie'=>'tasty!', - 'User-Agent'=>'fastly-ruby-v2.4.0' + 'User-Agent'=> /fastly-ruby/ }). to_return(status: 403, body: '{"msg":"You must POST /sudo to access this endpoint"}', headers: {}) assert_raises(Fastly::Error,'{"msg":"You must POST /sudo to access this endpoint"}') do elevated_fastly.create_token( @@ -57,11 +57,11 @@ headers: { 'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Accept'=>'application/json', 'Content-Type'=>'application/x-www-form-urlencoded', - 'User-Agent'=>'fastly-ruby-v2.4.0' + 'User-Agent'=> /fastly-ruby/ }). to_return(status: 200, body: response_body, headers: {}) token = elevated_fastly.new_token( name: 'name_of_token', @@ -87,11 +87,11 @@ headers: { 'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Accept'=>'application/json', 'Fastly-Key'=>'my_api_key', - 'User-Agent'=>'fastly-ruby-v2.4.0' + 'User-Agent'=> /fastly-ruby/ }). to_return(status: 204, body: "", headers: {}) token = Fastly::Token.new({acess_token: 'my_api_key'}, Fastly::Fetcher) fastly.delete_token(token) @@ -103,11 +103,11 @@ headers: { 'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Accept'=>'application/json', 'Fastly-Key'=>'my_api_key', - 'User-Agent'=>'fastly-ruby-v2.4.0' + 'User-Agent'=> /fastly-ruby/ }). to_return(status: 200, body: "[]", headers: {}) fastly.list_tokens() end @@ -118,10 +118,10 @@ headers: { 'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Accept'=>'application/json', 'Fastly-Key'=>'my_api_key', - 'User-Agent'=>'fastly-ruby-v2.4.0' + 'User-Agent'=> /fastly-ruby/ }). to_return(status: 200, body: "[]", headers: {}) fastly.customer_tokens({customer_id: 'customer_account_number'}) end