summaryrefslogtreecommitdiff
path: root/spec/features/ci/commits_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/ci/commits_spec.rb')
-rw-r--r--spec/features/ci/commits_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/features/ci/commits_spec.rb b/spec/features/ci/commits_spec.rb
index 40a62ca4574..657a9dabe9e 100644
--- a/spec/features/ci/commits_spec.rb
+++ b/spec/features/ci/commits_spec.rb
@@ -5,11 +5,10 @@ describe "Commits" do
context "Authenticated user" do
before do
- @project = FactoryGirl.create :ci_project
- @commit = FactoryGirl.create :ci_commit, project: @project
+ @commit = FactoryGirl.create :ci_commit
@build = FactoryGirl.create :ci_build, commit: @commit
login_as :user
- @project.gl_project.team << [@user, :master]
+ @commit.project.gl_project.team << [@user, :master]
end
describe "GET /:project/commits/:sha" do
@@ -51,8 +50,10 @@ describe "Commits" do
context "Public pages" do
before do
- @project = FactoryGirl.create :ci_public_project
- @commit = FactoryGirl.create :ci_commit, project: @project
+ @commit = FactoryGirl.create :ci_commit
+ @commit.project.public = true
+ @commit.project.save
+
@build = FactoryGirl.create :ci_build, commit: @commit
end