mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Create a factory for organizer
Refactor organizer user creation in tests Fixes https://github.com/openSUSE/osem/issues/2398
This commit is contained in:
parent
0197ed3c46
commit
35ec178beb
31 changed files with 48 additions and 68 deletions
|
|
@ -6,8 +6,7 @@ describe Admin::ProgramsController, type: :controller do
|
|||
|
||||
# It is necessary to use bang version of let to build roles before user
|
||||
let(:conference) { create(:conference) }
|
||||
let!(:organizer_role) { Role.find_by(name: 'organizer', resource: conference) }
|
||||
let(:organizer) { create(:user, role_ids: organizer_role.id, last_sign_in_at: Time.now - 1.day) }
|
||||
let!(:organizer) { create(:organizer, resource: conference) }
|
||||
|
||||
context 'not logged in user' do
|
||||
describe 'GET #show' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue