Skip to content

Commit

Permalink
TW-115 changed the controller to individualize the creation message.
Browse files Browse the repository at this point in the history
  • Loading branch information
BethFrank committed Feb 5, 2015
1 parent f60c372 commit f813e40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/controllers/taxon_names_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def create

respond_to do |format|
if @taxon_name.save
format.html { redirect_to @taxon_name.metamorphosize, notice: 'Taxon name was successfully created.' }
format.html { redirect_to @taxon_name.metamorphosize,
notice: "Taxon name '#{@taxon_name.name}' was successfully created." }
format.json { render action: 'show', status: :created, location: @taxon_name }
else
format.html { render action: 'new' }
Expand Down
4 changes: 2 additions & 2 deletions spec/features/taxon_names_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
fill_autocomplete('parent_id_for_name', with: 'root')

click_button('Create Taxon name') # when I click the 'Create Taxon name' button
# then I get the message "Taxon name 'Foodiae' was successfully created"
expect(page).to have_content('Taxon name was successfully created.')
# then I get the message "Taxon name 'Foodiae' was successfully created."
expect(page).to have_content("Taxon name 'Fooidae' was successfully created.")
end
end
end
Expand Down

0 comments on commit f813e40

Please sign in to comment.