summaryrefslogtreecommitdiff
path: root/spec/features/profile_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-04 16:20:40 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-04 16:20:40 +0300
commit8e238f42732e5968dc46e3f08d853d0f3c9b2760 (patch)
treeca6e167519d60529ce9709592ca07ef4ea895645 /spec/features/profile_spec.rb
parent7b8bd93e673a6ace673cab00e0cc10489d64437d (diff)
downloadgitlab-ce-8e238f42732e5968dc46e3f08d853d0f3c9b2760.tar.gz
Fix user remove tests. Remove user even if he has projects
Diffstat (limited to 'spec/features/profile_spec.rb')
-rw-r--r--spec/features/profile_spec.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb
index 7fa474d0ea1..80c9f5d7f14 100644
--- a/spec/features/profile_spec.rb
+++ b/spec/features/profile_spec.rb
@@ -17,26 +17,12 @@ describe "Profile account page" do
it { page.should have_content("Remove account") }
- it "should delete the account", js: true do
+ it "should delete the account" do
expect { click_link "Delete account" }.to change {User.count}.by(-1)
current_path.should == new_user_session_path
end
end
- describe "when signup is enabled and user has a project" do
- before do
- Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
- @project = create(:project, namespace: @user.namespace)
- @project.team << [@user, :master]
- visit account_profile_path
- end
- it { page.should have_content("Remove account") }
-
- it "should not allow user to delete the account" do
- expect { click_link "Delete account" }.not_to change {User.count}.by(-1)
- end
- end
-
describe "when signup is disabled" do
before do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(false)