Sha256: 4832fcd3b68d2228464c055869580c43f8a8edbb9bf76a21c7987a378bad59d8

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 Bytes

Contents

require 'spec_helper'

describe Warden::GitHub::Rails::TestHelpers::MockUser do
  it { should be_a Warden::GitHub::User }

  describe '#stub_membership' do
    subject(:user) { described_class.new }

    it 'stubs memberships' do
      user.should_not be_team_member(123)
      user.should_not be_organization_member('foobar')

      user.stub_membership(:team => 123)
      user.stub_membership(:org => 'foobar')

      user.should be_team_member(123)
      user.should be_organization_member('foobar')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
warden-github-rails-1.0.0 spec/unit/mock_user_spec.rb
warden-github-rails-0.0.1 spec/unit/mock_user_spec.rb