Change update/save failures to use flash type :error instead of :alert

This commit is contained in:
Nishanth Vijayan 2016-03-16 11:20:56 +05:30
parent 19c54bd935
commit 1c1e56ed46
10 changed files with 13 additions and 13 deletions

View file

@ -56,7 +56,7 @@ describe Admin::ConferenceController do
short_title: nil)
conference.reload
expect(flash[:alert]).
expect(flash[:error]).
to eq("Updating conference failed. Short title can't be blank.")
expect(conference.title).to eq('The dog and pony show')
expect(conference.short_title).to eq("#{conference.short_title}")
@ -67,7 +67,7 @@ describe Admin::ConferenceController do
attributes_for(:conference, title: 'Example Con',
short_title: nil)
expect(flash[:alert]).
expect(flash[:error]).
to eq("Updating conference failed. Short title can't be blank.")
expect(response).to redirect_to edit_admin_conference_path(
conference.short_title)