Sha256: ab06694e2c631d6d4e11efb4453e396d775f38c6a0929a81ab18376229435965
Contents?: true
Size: 667 Bytes
Versions: 10
Compression:
Stored size: 667 Bytes
Contents
module CcApiStub module Login class << self def succeeds_to_find_uaa(domain="http://some-other-random-domain.com:8181") WebMock::API.stub_request(:get, "#{domain}/info"). to_return( :status => 200, :body => "{\"token_endpoint\":\"https://uaa.localhost\"}" ) end def succeeds_to_login_as_admin WebMock::API.stub_request(:post, %r{uaa.localhost/oauth/authorize}). to_return( :status => 302, :headers => {"Location" => "https://uaa.localhost/redirect/vmc#access_token=sre-admin-access-token&token_type=bearer"} ) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems