Sha256: fa5779436a5e1b451a694e9c30689d0b3ea94c7f01f8d43df961821610c23929
Contents?: true
Size: 699 Bytes
Versions: 5
Compression:
Stored size: 699 Bytes
Contents
require 'spec_helper' module OpenStax::Accounts module Dev describe UsersController do routes { OpenStax::Accounts::Engine.routes } let!(:user) { OpenStax::Accounts::User.create(username: 'some_user', openstax_uid: 1) } it 'should allow users not in production to become other users' do expect(controller.current_user).to eq(OpenStax::Accounts::User.anonymous) expect(controller.current_user.is_anonymous?).to eq(true) get :become, user_id: user.id expect(controller.current_user).to eq(user) expect(controller.current_user.is_anonymous?).to eq(false) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems