Sha256: 1015b6bbc197291d338401849b2dd867ea99cdd07af1d92aa6adac99472950e7

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 Bytes

Contents

require 'spec_helper'

describe Instapaper::Client::Account do
  before(:each) do
    @client = Instapaper::Client.new
  end

  describe '.verify_credentials' do
    before do
      stub_post("account/verify_credentials").
        to_return(:body => fixture("verify_credentials.json"), :headers => {:content_type => "application/json; charset=utf-8"})
    end

    it "should get the correct resource" do
      @client.verify_credentials
      a_post("account/verify_credentials").
        should have_been_made
    end

    it "should return the user" do
      user = @client.verify_credentials.first
      user.should be_a Hashie::Rash
      user.username.should == 'TestUserOMGLOL'
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
instapaper-0.3.0 spec/instapaper/client/account_spec.rb
instapaper-0.2.1 spec/instapaper/client/account_spec.rb
instapaper-0.2.0 spec/instapaper/client/account_spec.rb