Sha256: 228436bf14ef5ec2836bb69ceab1bd1bd9cbb4c414a805a06214988a2dd7ff44

Contents?: true

Size: 1.04 KB

Versions: 381

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'

describe Travis::Client::Account do
  context "from all accounts" do
    let(:session) { Travis::Client.new }
    subject { session.accounts.first }
    its(:name) { should be == 'Konstantin Haase' }
    its(:login) { should be == 'rkh' }
    its(:type) { should be == 'user' }
    its(:repos_count) { should be == 200 }
    its(:inspect) { should be == "#<Travis::Client::Account: rkh>" }
  end

  context "known account" do
    let(:session) { Travis::Client.new }
    subject { session.account('rkh') }
    its(:name) { should be == 'Konstantin Haase' }
    its(:login) { should be == 'rkh' }
    its(:type) { should be == 'user' }
    its(:repos_count) { should be == 200 }
    its(:inspect) { should be == "#<Travis::Client::Account: rkh>" }
  end

  context "known account" do
    let(:session) { Travis::Client.new }
    subject { session.account('foo') }
    its(:name) { should be_nil }
    its(:login) { should be == 'foo' }
    its(:type) { should be_nil }
    its(:inspect) { should be == "#<Travis::Client::Account: foo>" }
  end
end

Version data entries

381 entries across 381 versions & 3 rubygems

Version Path
travis-1.6.7.travis.442.6 spec/client/account_spec.rb
travis-1.6.7.travis.441.6 spec/client/account_spec.rb
travis-1.6.7.travis.434.6 spec/client/account_spec.rb
travis-1.6.7.travis.431.6 spec/client/account_spec.rb
travis-1.6.7.travis.428.9 spec/client/account_spec.rb
travis-1.6.7.travis.427.9 spec/client/account_spec.rb
travis-1.6.7.travis.426.8 spec/client/account_spec.rb
travis-1.6.7.travis.425.8 spec/client/account_spec.rb
travis-1.6.7.travis.422.4 spec/client/account_spec.rb
travis-1.6.7.travis.420.4 spec/client/account_spec.rb
travis-1.6.6 spec/client/account_spec.rb
travis-1.6.6.travis.419.4 spec/client/account_spec.rb
travis-1.6.6.travis.417.4 spec/client/account_spec.rb
travis-1.6.5 spec/client/account_spec.rb
travis-1.6.4.travis.414.4 spec/client/account_spec.rb
travis-1.6.4.travis.413.4 spec/client/account_spec.rb
travis-1.6.4.travis.410.4 spec/client/account_spec.rb
travis-1.6.4.travis.411.4 spec/client/account_spec.rb
travis-1.6.4.travis.406.4 spec/client/account_spec.rb
travis-1.6.4.travis.405.4 spec/client/account_spec.rb