Commit 9b2ed19be7490967eaee3c884631c1c7e7861e33
1 parent
c42db17a
Exists in
master
and in
1 other branch
Use flash[:success] instead of flash[:notice]
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/controllers/users_controller.rb
| @@ -51,7 +51,7 @@ class UsersController < ApplicationController | @@ -51,7 +51,7 @@ class UsersController < ApplicationController | ||
| 51 | @user = User.find(params[:id]) | 51 | @user = User.find(params[:id]) |
| 52 | @user.destroy | 52 | @user.destroy |
| 53 | 53 | ||
| 54 | - flash[:notice] = "That's sad. #{@user.name} is no longer part of your team." | 54 | + flash[:success[ = "That's sad. #{@user.name} is no longer part of your team." |
| 55 | redirect_to users_path | 55 | redirect_to users_path |
| 56 | end | 56 | end |
| 57 | 57 |
spec/controllers/users_controller_spec.rb
| @@ -122,7 +122,7 @@ describe UsersController do | @@ -122,7 +122,7 @@ describe UsersController do | ||
| 122 | 122 | ||
| 123 | it "sets a message to display" do | 123 | it "sets a message to display" do |
| 124 | delete :destroy, :id => @user.id | 124 | delete :destroy, :id => @user.id |
| 125 | - request.flash[:notice].should include('no longer part of your team') | 125 | + request.flash[:success[.should include('no longer part of your team') |
| 126 | end | 126 | end |
| 127 | end | 127 | end |
| 128 | 128 |