Sha256: 9d9884b304ef6151a57688c98fbc9e1d2dc7af5c78a9e4e5a4d422f7f207807b

Contents?: true

Size: 675 Bytes

Versions: 26

Compression:

Stored size: 675 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 => "{\"authorization_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

26 entries across 26 versions & 3 rubygems

Version Path
cloulu-1.0.0 lib/cc_api_stub/login.rb
cloulu-0.7.0 lib/cc_api_stub/login.rb
cloulu-0.6.6 lib/cc_api_stub/login.rb
cloulu-0.6.5 lib/cc_api_stub/login.rb
cloulu-0.6.1 lib/cc_api_stub/login.rb
cloulu-0.6.0 lib/cc_api_stub/login.rb
cloulu-0.5.1 lib/cc_api_stub/login.rb
cloulu-0.5.0 lib/cc_api_stub/login.rb
cloulu-0.3.0 lib/cc_api_stub/login.rb
cloulu-0.2.6 lib/cc_api_stub/login.rb
cloulu-0.2.5 lib/cc_api_stub/login.rb
cloulu-0.2.4 lib/cc_api_stub/login.rb
cloulu-0.2.3 lib/cc_api_stub/login.rb
cloulu-0.2.1 lib/cc_api_stub/login.rb
cloulu-0.2.0 lib/cc_api_stub/login.rb
cloulu-0.1.6 lib/cc_api_stub/login.rb
cloulu-0.1.5 lib/cc_api_stub/login.rb
cloulu-0.1.2 lib/cc_api_stub/login.rb
cloulu-0.1.1 lib/cc_api_stub/login.rb
static-1.0.3 vendor/cfoundry-0.5.2/lib/cc_api_stub/login.rb