Fixing some tests that weren't testing correctly
These assertions were always returning true even if you dont populate the flash, because nil.should_not be_empty returns true
This commit is contained in:
parent
a74080e27d
commit
234af2a15b
4 changed files with 4 additions and 4 deletions
|
|
@ -59,7 +59,7 @@ describe AspectMembershipsController do
|
|||
:format => 'js',
|
||||
:person_id => @person.id,
|
||||
:aspect_id => @aspect0.id
|
||||
flash[:error].should_not be_empty
|
||||
flash[:error].should_not be_blank
|
||||
end
|
||||
|
||||
it 'does not 500 on a duplicate key error' do
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ describe InvitationsController do
|
|||
it 'displays a message that tells the user how many invites were sent, and which REJECTED' do
|
||||
post :create, :user => @invite.merge(
|
||||
:email => "mbs@gmail.com, foo@bar.com, foo.com, lala@foo, cool@bar.com")
|
||||
flash[:notice].should_not be_empty
|
||||
flash[:notice].should_not be_blank
|
||||
flash[:notice].should =~ /foo\.com/
|
||||
flash[:notice].should =~ /lala@foo/
|
||||
end
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ describe ProfilesController do
|
|||
:first_name => "Will",
|
||||
:last_name => "Smith"
|
||||
}
|
||||
flash[:notice].should_not be_empty
|
||||
flash[:notice].should_not be_blank
|
||||
end
|
||||
|
||||
it 'sets tags' do
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ describe RegistrationsController do
|
|||
|
||||
it "sets the flash" do
|
||||
get :create, @valid_params
|
||||
flash[:notice].should_not be_empty
|
||||
flash[:notice].should_not be_blank
|
||||
end
|
||||
|
||||
it "redirects to the home path" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue