aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorXinhui2016-08-03 16:07:22 +0200
committerXinhui2016-08-03 16:07:22 +0200
commitfa7154a9fe684f8b42bfc4afcacaa56bc1fe6d45 (patch)
treedb8dbbfe5e173efe864943f9c6a6ba295a8a919d /spec
parent042fe3d039bdd91325bd8098cedcadc025713df6 (diff)
downloadchouette-core-fa7154a9fe684f8b42bfc4afcacaa56bc1fe6d45.tar.bz2
Remove device :confirmable
Diffstat (limited to 'spec')
-rw-r--r--spec/features/users/user_edit_spec.rb2
-rw-r--r--spec/features/users/user_index_spec.rb1
-rw-r--r--spec/features/users/user_show_spec.rb3
-rw-r--r--spec/support/devise.rb2
4 files changed, 0 insertions, 8 deletions
diff --git a/spec/features/users/user_edit_spec.rb b/spec/features/users/user_edit_spec.rb
index c7c742416..23a58ecae 100644
--- a/spec/features/users/user_edit_spec.rb
+++ b/spec/features/users/user_edit_spec.rb
@@ -36,9 +36,7 @@ feature 'User edit', :devise do
# Then I see my own 'edit profile' page
scenario "user cannot cannot edit another user's profile", :me do
me = FactoryGirl.create(:user)
- me.confirm!
other = FactoryGirl.create(:user, email: 'other@example.com')
- other.confirm!
login_as(me, :scope => :user)
visit edit_user_registration_path(other)
expect(page).to have_content 'Votre Profil'
diff --git a/spec/features/users/user_index_spec.rb b/spec/features/users/user_index_spec.rb
index 2f6ec4426..2a9199da3 100644
--- a/spec/features/users/user_index_spec.rb
+++ b/spec/features/users/user_index_spec.rb
@@ -19,7 +19,6 @@ feature 'User index page', :devise do
# Then I see my own email address
scenario 'user sees own email address' do
user = create(:user)
- user.confirm!
login_as(user, scope: :user)
visit organisation_path
expect(page).to have_content user.name.truncate(15)
diff --git a/spec/features/users/user_show_spec.rb b/spec/features/users/user_show_spec.rb
index 4a56e3255..d840d752c 100644
--- a/spec/features/users/user_show_spec.rb
+++ b/spec/features/users/user_show_spec.rb
@@ -19,7 +19,6 @@ feature 'User profile page', :devise do
# Then I see my own email address
scenario 'user sees own profile' do
user = FactoryGirl.create(:user)
- user.confirm!
login_as(user, :scope => :user)
visit organisation_user_path(user)
# FIXME ref #819
@@ -33,9 +32,7 @@ feature 'User profile page', :devise do
# Then I see an 'access denied' message
scenario "user cannot see another user's profile" do
me = FactoryGirl.create(:user)
- me.confirm!
other = FactoryGirl.create(:user, email: 'other@example.com', :organisation => me.organisation)
- other.confirm!
login_as(me, :scope => :user)
Capybara.current_session.driver.header 'Referer', authenticated_root_path
visit organisation_user_path(other)
diff --git a/spec/support/devise.rb b/spec/support/devise.rb
index cd5782f36..d33812e6f 100644
--- a/spec/support/devise.rb
+++ b/spec/support/devise.rb
@@ -4,7 +4,6 @@ module DeviseRequestHelper
def login_user
organisation = Organisation.where(:name => "first").first_or_create(attributes_for(:organisation))
@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
@@ -36,7 +35,6 @@ module DeviseControllerHelper
@request.env["devise.mapping"] = Devise.mappings[:user]
organisation = Organisation.where(:name => "first").first_or_create(attributes_for(:organisation))
user = create(:user, :organisation => organisation)
- user.confirm!
sign_in user
end
end