Sha256: 42c08db9300f8791e427c6ba00d5a882761441aee90afc3005354947d04fedaa

Contents?: true

Size: 541 Bytes

Versions: 2

Compression:

Stored size: 541 Bytes

Contents

require 'ostruct'
require 'iremix/user'

module Iremix
  describe User do
    describe ".current" do
      it "returns the parsed user" do
        token = OpenStruct.new(:access_token => '123abc')
        response = OpenStruct.new(:parsed => 'user_json_parsed')

        token.should_receive(:get)
              .with('/api/v1/people/current.json',
                    :params => { :access_token => '123abc' })
              .and_return(response)

        Iremix::User.current(token).should == 'user_json_parsed'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iremix-ruby-0.0.3 spec/iremix/user_spec.rb
iremix-ruby-0.0.2 spec/iremix/user_spec.rb