refactoring setup_roles and updated tests
This commit is contained in:
parent
86c188a38a
commit
84843ade48
5 changed files with 27 additions and 14 deletions
|
|
@ -2,6 +2,11 @@ require 'spec_helper'
|
|||
|
||||
feature Event do
|
||||
|
||||
# It is necessary to use bang version of let to build roles before user
|
||||
let!(:organizer_role) { create(:organizer_role) }
|
||||
let!(:participant_role) { create(:participant_role) }
|
||||
let!(:admin_role) { create(:admin_role) }
|
||||
|
||||
shared_examples 'participant' do |user|
|
||||
scenario 'submitts a new proposal and updates account', feature: true, js: true do
|
||||
expected_count = Event.count + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue