mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Mention organization name while creating a conference
This commit is contained in:
parent
c596a9fda7
commit
1a5aa14e2c
3 changed files with 7 additions and 3 deletions
|
|
@ -2,13 +2,15 @@ require 'spec_helper'
|
|||
|
||||
feature Conference do
|
||||
let!(:user) { create(:admin) }
|
||||
|
||||
let!(:organization) { create(:organization) }
|
||||
shared_examples 'add and update conference' do
|
||||
scenario 'adds a new conference', feature: true, js: true do
|
||||
expected_count = Conference.count + 1
|
||||
sign_in user
|
||||
|
||||
visit new_admin_conference_path
|
||||
|
||||
select organization.name, from: 'conference_organization_id'
|
||||
fill_in 'conference_title', with: 'Example Con'
|
||||
fill_in 'conference_short_title', with: 'ExCon'
|
||||
|
||||
|
|
@ -27,7 +29,7 @@ feature Conference do
|
|||
expect(flash)
|
||||
.to eq('Conference was successfully created.')
|
||||
expect(Conference.count).to eq(expected_count)
|
||||
|
||||
expect(Conference.last.organization).to eq(organization)
|
||||
expect(user.has_role? :organizer, Conference.last).to eq(true)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue