Sha256: d034820aab315ba0dd09fdb6f1baba26574919242f0b3336c3ed3bf19001aa88

Contents?: true

Size: 799 Bytes

Versions: 10

Compression:

Stored size: 799 Bytes

Contents

require 'helper'

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

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

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

    it 'contains a response that has some snapshots' do
      snapshots = @client.list_snapshots
      expect(snapshots).to be_an Hash
      expect(snapshots[:snapshots]).to be_an Array
      snapshot = snapshots[:snapshots].first
      expect(snapshot).to be_an Hash
    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_snapshots_spec.rb
cc-terminal-0.1.1 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.1.0 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.8 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.7 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.6 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.5 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.4 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.3 spec/terminal/modules/create_and_manage_snapshots_spec.rb
cc-terminal-0.0.2 spec/terminal/modules/create_and_manage_snapshots_spec.rb