Moves conference show #action to #edit action
This commit is contained in:
parent
89fb059aaa
commit
ab4d3021a2
9 changed files with 80 additions and 42 deletions
|
|
@ -36,7 +36,7 @@ describe Admin::ConferenceController do
|
|||
patch :update, id: conference.short_title, conference:
|
||||
attributes_for(:conference, title: 'Example Con')
|
||||
conference.reload
|
||||
expect(response).to redirect_to admin_conference_path(
|
||||
expect(response).to redirect_to edit_admin_conference_path(
|
||||
conference.short_title)
|
||||
end
|
||||
end
|
||||
|
|
@ -61,7 +61,7 @@ describe Admin::ConferenceController do
|
|||
|
||||
expect(flash[:alert]).
|
||||
to eq("Updating conference failed. Short title can't be blank.")
|
||||
expect(response).to redirect_to admin_conference_path(
|
||||
expect(response).to redirect_to edit_admin_conference_path(
|
||||
conference.short_title)
|
||||
end
|
||||
end
|
||||
|
|
@ -120,6 +120,18 @@ describe Admin::ConferenceController do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'GET #edit' do
|
||||
it 'assigns the requested conference to conference' do
|
||||
get :show, id: conference.short_title
|
||||
expect(assigns(:conference)).to eq conference
|
||||
end
|
||||
|
||||
it 'renders the show template' do
|
||||
get :show, id: conference.short_title
|
||||
expect(response).to render_template :show
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #show' do
|
||||
it 'assigns the requested conference to conference' do
|
||||
get :show, id: conference.short_title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue