diff options
| author | Vlatka Pavisic | 2017-01-16 15:21:11 +0100 |
|---|---|---|
| committer | Vlatka Pavisic | 2017-01-16 15:21:11 +0100 |
| commit | 307f808e2c812bccccd1c6246ca6b8583be4ef40 (patch) | |
| tree | 694dc741ecef8f502097f5c79e5217f933bd727b /spec/support/devise.rb | |
| parent | 9e69db1f517d15ab52cd169e3a5774d9071c3630 (diff) | |
| download | chouette-core-307f808e2c812bccccd1c6246ca6b8583be4ef40.tar.bz2 | |
Refs #2399 : User routes permissions
Diffstat (limited to 'spec/support/devise.rb')
| -rw-r--r-- | spec/support/devise.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/devise.rb b/spec/support/devise.rb index 2258fefbb..ae166d284 100644 --- a/spec/support/devise.rb +++ b/spec/support/devise.rb @@ -3,7 +3,7 @@ module DeviseRequestHelper def login_user organisation = Organisation.where(:code => "first").first_or_create(attributes_for(:organisation)) - @user ||= create(:user, :organisation => organisation) + @user ||= create(:user, :organisation => organisation, :permissions => ['routes.create', 'routes.edit', 'routes.destroy']) login_as @user, :scope => :user # post_via_redirect user_session_path, 'user[email]' => @user.email, 'user[password]' => @user.password end @@ -34,7 +34,7 @@ module DeviseControllerHelper before(:each) do @request.env["devise.mapping"] = Devise.mappings[:user] organisation = Organisation.where(:code => "first").first_or_create(attributes_for(:organisation)) - user = create(:user, :organisation => organisation) + user = create(:user, :organisation => organisation, :permissions => ['routes.create', 'routes.edit', 'routes.destroy']) sign_in user end end |
