Sha256: e33b6a5d34b8cc2553cd90d70520f4e2025a2650863b458d9f3c736e812ad3c6

Contents?: true

Size: 1.54 KB

Versions: 6

Compression:

Stored size: 1.54 KB

Contents

require 'gooddata/connection'
require 'gooddata/core/connection'

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

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

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

  it "Has TOKEN_PATH defined" do
    GoodData::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::Connection)
      GoodData.disconnect
    end
  end

  describe '#disconnect' do
    it "Connects using username and password" do
      GoodData.connect(ConnectionHelper::DEFAULT_USERNAME, ConnectionHelper::DEFAULT_PASSWORD)
      GoodData.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)
      GoodData.disconnect
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gooddata-0.6.7 spec/unit/core/connection_spec.rb
gooddata-0.6.6 spec/unit/core/connection_spec.rb
gooddata-0.6.5 spec/unit/core/connection_spec.rb
gooddata-0.6.4 spec/unit/core/connection_spec.rb
gooddata-0.6.3 spec/unit/core/connection_spec.rb
gooddata-0.6.2 spec/unit/core/connection_spec.rb