diff options
| author | Marc Florisson | 2012-09-07 16:23:25 +0200 | 
|---|---|---|
| committer | Marc Florisson | 2012-09-07 16:23:25 +0200 | 
| commit | 649e931ed4fd282229c7aca65092b03e13c57b0c (patch) | |
| tree | ec9f8c0e1fe67fcc176a5c93f2646fbebd9224d0 /spec/support | |
| parent | 52e6883e0ad7d2ce1c03cd9db390e1cde66d1a7b (diff) | |
| download | chouette-core-649e931ed4fd282229c7aca65092b03e13c57b0c.tar.bz2 | |
fix spec
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/devise.rb | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/devise.rb b/spec/support/devise.rb index 4e0e3a4d2..b50f3a71a 100644 --- a/spec/support/devise.rb +++ b/spec/support/devise.rb @@ -4,6 +4,7 @@ module DeviseRequestHelper    def login_user      organisation = Organisation.find_by_name("first") || create(:organisation, :name => "first")      @user ||= create(:user, :organisation => organisation)  +    @user.confirm!      login_as @user, :scope => :user      # post_via_redirect user_session_path, 'user[email]' => @user.email, 'user[password]' => @user.password    end @@ -34,7 +35,9 @@ module DeviseControllerHelper      before(:each) do        @request.env["devise.mapping"] = Devise.mappings[:user]        organisation = Organisation.find_by_name("first") || create(:organisation, :name => "first") -      sign_in create(:user, :organisation => organisation) +      user = create(:user, :organisation => organisation) +      user.confirm! +      sign_in user      end    end  end  | 
