Sha256: 48a79f8e07cec50003a67e4eb6e97e4edbb5cfa46c56bebbee5d4032ab072805

Contents?: true

Size: 518 Bytes

Versions: 19

Compression:

Stored size: 518 Bytes

Contents

require 'spec_helper'

describe Highrise::User do
  it { should be_a_kind_of Highrise::Base }
  
  it ".me" do
    Highrise::User.should_receive(:find).with(:one, {:from => "/me.xml"}).and_return(subject)
    Highrise::User.me.should == subject
  end
  
  it "#join" do
    group_mock = mock("group")
    group_mock.should_receive(:id).and_return(2)
    subject.should_receive(:id).and_return(1)
    Highrise::Membership.should_receive(:create).with({:user_id=>1, :group_id=>2})
    subject.join(group_mock)
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
highrise-3.2.3 spec/highrise/user_spec.rb
highrise-3.2.1 spec/highrise/user_spec.rb
highrise-3.1.6 spec/highrise/user_spec.rb
highrise-3.1.5 spec/highrise/user_spec.rb
highrise-3.1.2 spec/highrise/user_spec.rb
highrise-3.1.1 spec/highrise/user_spec.rb
highrise-3.1.0 spec/highrise/user_spec.rb
highrise-3.1.0.pre spec/highrise/user_spec.rb
highrise-3.0.5 spec/highrise/user_spec.rb
highrise-3.0.4 spec/highrise/user_spec.rb
highrise-3.0.3 spec/highrise/user_spec.rb
peterosullivan-highrise-3.0.7 spec/highrise/user_spec.rb
peterosullivan-highrise-3.0.6 spec/highrise/user_spec.rb
peterosullivan-highrise-3.0.5 spec/highrise/user_spec.rb
peterosullivan-highrise-3.0.4 spec/highrise/user_spec.rb
peterosullivan-highrise-3.0.3 spec/highrise/user_spec.rb
peterosullivan-highrise-3.0.2 spec/highrise/user_spec.rb
highrise-3.0.1 spec/highrise/user_spec.rb
highrise-3.0.0 spec/highrise/user_spec.rb