Sha256: 91775a68b4ac73b266e9f20cc1315bbe6ab7bce923b0393c7a76d15a20995946

Contents?: true

Size: 770 Bytes

Versions: 10

Compression:

Stored size: 770 Bytes

Contents

require 'helper'

describe Terminal::Modules::CreateAndManageTerminals do
  before do
    @client = Terminal::Client.new(:access_token => 'blah', :user_token => 'blah2')
  end

  describe "get a list of terminals" do
    before do
      stub_post('list_terminals').to_return(:body => fixture('list_terminals.json'), :headers => {:content_type => 'application/json'})
    end

    it 'posts to the proper endpoint' do
      @client.list_terminals
      expect(a_post('list_terminals')).to have_been_made
    end

    it 'contains a response that has some terminals' do
      terminals = @client.list_terminals
      expect(terminals).to be_an Hash
      expect(terminals[:terminals]).to be_an Array
      # Maybe check the actual structure here as well
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cc-terminal-0.1.2 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.1.1 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.1.0 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.8 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.7 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.6 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.5 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.4 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.3 spec/terminal/modules/create_and_manage_terminals_spec.rb
cc-terminal-0.0.2 spec/terminal/modules/create_and_manage_terminals_spec.rb