Sha256: 5444a964a7659a76c494d41d602a9a5a9dfc79d1e43f08dfb5f9b428db60c764

Contents?: true

Size: 682 Bytes

Versions: 19

Compression:

Stored size: 682 Bytes

Contents

require 'spec/spec_helper'
require 'rpx_now/user_integration'

class User
  include RPXNow::UserIntegration

  def id
    5
  end
end

describe RPXNow::UserProxy do
  before { @user = User.new }

  it "has a proxy" do
    @user.rpx.class.should == RPXNow::UserProxy
  end

  it "has identifiers" do
    RPXNow.should_receive(:mappings).with(@user.id).and_return(['identifiers'])
    @user.rpx.identifiers.should == ['identifiers']
  end

  it "can map" do
    RPXNow.should_receive(:map).with('identifier', @user.id)
    @user.rpx.map('identifier')
  end

  it "can unmap" do
    RPXNow.should_receive(:unmap).with('identifier', @user.id)
    @user.rpx.unmap('identifier')
  end
end

Version data entries

19 entries across 19 versions & 4 rubygems

Version Path
slayer-rpx_now-0.6.25 spec/rpx_now/user_proxy_spec.rb
slayer-rpx_now-0.6.24 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.24 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.23 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.22 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.21 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.20 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.19 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.18 spec/rpx_now/user_proxy_spec.rb
Empact-rpx_now-0.7.0 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.17 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.16 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.15 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.14 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.13 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.12 spec/rpx_now/user_proxy_spec.rb
kent-rpx_now-0.6.11 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.11 spec/rpx_now/user_proxy_spec.rb
rpx_now-0.6.10 spec/rpx_now/user_proxy_spec.rb