Sha256: e22ec4557c2d1d2a7f20bd6af88da97ebed0cf5722358bb558499745e76baf6c

Contents?: true

Size: 729 Bytes

Versions: 10

Compression:

Stored size: 729 Bytes

Contents

require 'helper'

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

  describe "get_snapshot" do
    before do
      stub_post('get_snapshot').to_return(:body => fixture('get_snapshot.json'), :headers => {:content_type => 'application/json'})
    end

    it 'calls the proper endpoint' do
      @client.get_snapshot('some_id')
      expect(a_post('get_snapshot')).to have_been_made
    end

    it 'returns a hash with some snapshot information' do
      snapshot = @client.get_snapshot('some_id')
      expect(snapshot[:snapshot]).to be_an(Hash)
      expect(snapshot[:snapshot][:id]).to be_an(String)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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