Refactoring alert message for conference controller

This commit is contained in:
Chrisbr 2014-05-14 11:47:54 +02:00
parent a8c9c2f2d4
commit 3d534ff7ba
2 changed files with 8 additions and 5 deletions

View file

@ -48,7 +48,8 @@ describe Admin::ConferenceController do
short_title: nil)
conference.reload
expect(flash[:error]).to eq("Conference update failed. Short title can't be blank")
expect(flash[:alert]).
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('dps14')
end
@ -58,7 +59,8 @@ describe Admin::ConferenceController do
attributes_for(:conference, title: 'Example Con',
short_title: nil)
expect(flash[:error]).to eq("Conference update failed. Short title can't be blank")
expect(flash[:alert]).
to eq("Updating conference failed. Short title can't be blank.")
expect(response).to redirect_to admin_conference_path(
conference.short_title)
end