diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-12 16:47:06 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-12 16:47:06 -0800 |
commit | 1343b2dfac288eb60d536cc3d1a94de1eb178b51 (patch) | |
tree | 9b593febf0ca24c2ae4c68fa4a44e058dd512f94 /spec/features/profile_spec.rb | |
parent | f9880c11f754c278cbd00eb34ea65e90160571db (diff) | |
parent | 686000446639fbf0756733c822a1ebb19e09e121 (diff) | |
download | gitlab-ce-1343b2dfac288eb60d536cc3d1a94de1eb178b51.tar.gz |
Merge pull request #8785 from jvanbaarsen/rspec-upgrade
Rspec upgrade
Diffstat (limited to 'spec/features/profile_spec.rb')
-rw-r--r-- | spec/features/profile_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb index 4a76e89fd34..3d36a3c02d0 100644 --- a/spec/features/profile_spec.rb +++ b/spec/features/profile_spec.rb @@ -1,35 +1,35 @@ require 'spec_helper' -describe "Profile account page", feature: true do +describe 'Profile account page', feature: true do let(:user) { create(:user) } before do login_as :user end - describe "when signup is enabled" do + describe 'when signup is enabled' do before do ApplicationSetting.any_instance.stub(signup_enabled?: true) visit profile_account_path end - it { page.should have_content("Remove account") } + it { expect(page).to have_content('Remove account') } - it "should delete the account" do - expect { click_link "Delete account" }.to change {User.count}.by(-1) - current_path.should == new_user_session_path + it 'should delete the account' do + expect { click_link 'Delete account' }.to change { User.count }.by(-1) + expect(current_path).to eq(new_user_session_path) end end - describe "when signup is disabled" do + describe 'when signup is disabled' do before do ApplicationSetting.any_instance.stub(signup_enabled?: false) visit profile_account_path end - it "should not have option to remove account" do - page.should_not have_content("Remove account") - current_path.should == profile_account_path + it 'should not have option to remove account' do + expect(page).not_to have_content('Remove account') + expect(current_path).to eq(profile_account_path) end end end |