Changed views and routes
used sigular resource for routes added destroy action in custom domains made instructions in 'edit/new' and 'show' visually similar added new action and view for custom domain
This commit is contained in:
parent
0494f022d2
commit
7317fc1f9f
10 changed files with 100 additions and 79 deletions
|
|
@ -11,7 +11,7 @@ describe Admin::ConferenceDomainsController do
|
|||
describe 'GET #show' do
|
||||
it 'redirects to edit if custom domain is not present' do
|
||||
get :show, conference_id: conference.short_title
|
||||
expect(response).to redirect_to(admin_conference_conference_domains_edit_path)
|
||||
expect(response).to redirect_to(edit_admin_conference_domain_path)
|
||||
end
|
||||
|
||||
it 'renders correct template if custom domain is present' do
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ feature Conference do
|
|||
|
||||
shared_examples 'successfully adds, update or show custom domain' do
|
||||
scenario 'adds or update custom domain of a conference', feature: true, js: true do
|
||||
visit admin_conference_conference_domains_edit_path(conference.short_title)
|
||||
visit edit_admin_conference_domain_path(conference.short_title)
|
||||
|
||||
fill_in 'conference_custom_domain', with: 'newdomain.conf'
|
||||
click_button 'Attach this domain'
|
||||
|
|
@ -25,7 +25,7 @@ feature Conference do
|
|||
end
|
||||
|
||||
scenario 'show custom domain of a conference', feature: true, js: true do
|
||||
visit admin_conference_conference_domain_path(conference.short_title)
|
||||
visit admin_conference_domain_path(conference.short_title)
|
||||
|
||||
expect(page).to have_text('mydomain.conf')
|
||||
end
|
||||
|
|
@ -33,13 +33,13 @@ feature Conference do
|
|||
|
||||
shared_examples 'does not add, update or show custom domain' do
|
||||
scenario 'does not add or update custom domain', feature: true, js: true do
|
||||
visit admin_conference_conference_domains_edit_path(conference.short_title)
|
||||
visit edit_admin_conference_domain_path(conference.short_title)
|
||||
|
||||
expect(flash).to eq 'You are not authorized to access this page.'
|
||||
end
|
||||
|
||||
scenario 'does not show custom domain of a conference', feature: true, js: true do
|
||||
visit admin_conference_conference_domain_path(conference.short_title)
|
||||
visit admin_conference_domain_path(conference.short_title)
|
||||
|
||||
expect(flash).to eq 'You are not authorized to access this page.'
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue