Sha256: 252fe446f6266086af5149b6b8d88e8da01d58cb5990b7758d77444b0f4303e1

Contents?: true

Size: 1.53 KB

Versions: 4

Compression:

Stored size: 1.53 KB

Contents

require 'gooddata/connection'

describe GoodData::Rest::Connection do
  before(:all) do
    USERNAME = ConnectionHelper::DEFAULT_USERNAME
    PASSWORD = ConnectionHelper::DEFAULT_PASSWORD
  end

  it "Has DEFAULT_URL defined" do
    GoodData::Rest::Connection::DEFAULT_URL.should be_a(String)
  end

  it "Has LOGIN_PATH defined" do
    GoodData::Rest::Connection::LOGIN_PATH.should be_a(String)
  end

  it "Has TOKEN_PATH defined" do
    GoodData::Rest::Connection::TOKEN_PATH.should be_a(String)
  end

  describe '#connect' do
    it "Connects using username and password" do
      c = GoodData.connect(ConnectionHelper::DEFAULT_USERNAME, ConnectionHelper::DEFAULT_PASSWORD)
      c.should be_a(GoodData::Rest::Client)
      c.disconnect
    end
  end

  describe '#disconnect' do
    it "Connects using username and password" do
      c = GoodData.connect(ConnectionHelper::DEFAULT_USERNAME, ConnectionHelper::DEFAULT_PASSWORD)
      c.disconnect
    end
  end

  describe '#connect_with_sst' do
    it 'Connects using SST' do
      pending('Get SST')
    end
  end

  describe '#create_authenticated_connection' do
    it "Creates authenticated connection" do
      pending('Investigate how the credentials should be passed')
      GoodData.connect(ConnectionHelper::DEFAULT_USERNAME, ConnectionHelper::DEFAULT_PASSWORD)
      opts = {
        :username => ConnectionHelper::DEFAULT_USERNAME,
        :password => ConnectionHelper::DEFAULT_PASSWORD
      }
      GoodData.create_authenticated_connection(opts)
      ConnectionHelper.disconnect
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gooddata-0.6.11 spec/unit/core/connection_spec.rb
gooddata-0.6.10 spec/unit/core/connection_spec.rb
gooddata-0.6.9 spec/unit/core/connection_spec.rb
gooddata-0.6.8 spec/unit/core/connection_spec.rb