Commit 3b88636d3c3a85d8dea83149b1f401d505d84d60

Authored by Dmitriy Zaporozhets
1 parent adccf3b4

fix tests

spec/features/profile_spec.rb
@@ -12,8 +12,9 @@ describe "Profile account page" do @@ -12,8 +12,9 @@ describe "Profile account page" do
12 Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) 12 Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
13 visit account_profile_path 13 visit account_profile_path
14 end 14 end
  15 +
15 it { page.should have_content("Remove account") } 16 it { page.should have_content("Remove account") }
16 - 17 +
17 it "should delete the account", js: true do 18 it "should delete the account", js: true do
18 expect { click_link "Delete account" }.to change {User.count}.by(-1) 19 expect { click_link "Delete account" }.to change {User.count}.by(-1)
19 current_path.should == new_user_session_path 20 current_path.should == new_user_session_path
@@ -45,4 +46,4 @@ describe "Profile account page" do @@ -45,4 +46,4 @@ describe "Profile account page" do
45 current_path.should == account_profile_path 46 current_path.should == account_profile_path
46 end 47 end
47 end 48 end
48 -end  
49 \ No newline at end of file 49 \ No newline at end of file
  50 +end
spec/features/security/project_access_spec.rb
@@ -14,7 +14,7 @@ describe "Application access" do @@ -14,7 +14,7 @@ describe "Application access" do
14 end 14 end
15 15
16 describe "Project" do 16 describe "Project" do
17 - let(:project) { create(:project) } 17 + let(:project) { create(:project_with_code) }
18 18
19 let(:master) { create(:user) } 19 let(:master) { create(:user) }
20 let(:guest) { create(:user) } 20 let(:guest) { create(:user) }
spec/support/test_env.rb
@@ -29,16 +29,12 @@ module TestEnv @@ -29,16 +29,12 @@ module TestEnv
29 remove_key: true 29 remove_key: true
30 ) 30 )
31 31
32 - fake_satellite = stub( 32 + Gitlab::Satellite::Satellite.any_instance.stub(
33 exists?: true, 33 exists?: true,
34 destroy: true, 34 destroy: true,
35 create: true 35 create: true
36 ) 36 )
37 37
38 - Project.any_instance.stub(  
39 - satellite: fake_satellite  
40 - )  
41 -  
42 MergeRequest.any_instance.stub( 38 MergeRequest.any_instance.stub(
43 check_if_can_be_merged: true 39 check_if_can_be_merged: true
44 ) 40 )