Skip to content
Snippets Groups Projects
Commit 0f3deac3 authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Fix tests

parent 0fa4ab5f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -104,7 +104,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
 
step 'commit has ci status' do
@project.enable_ci(@user)
create :ci_commit, project: @project.gitlab_ci_project, sha: sample_commit.id
create :ci_commit, gl_project: @project, sha: sample_commit.id
end
 
step 'I see commit ci info' do
Loading
Loading
Loading
Loading
@@ -204,6 +204,6 @@ module SharedProject
 
step 'project "Shop" has CI build' do
project = Project.find_by(name: "Shop")
create :ci_commit, project: project.gitlab_ci_project, sha: project.commit.sha
create :ci_commit, gl_project: project, sha: project.commit.sha
end
end
Loading
Loading
@@ -4,13 +4,12 @@ describe "Charts" do
 
context "build_times" do
before do
@project = FactoryGirl.create(:ci_project)
@commit = FactoryGirl.create(:ci_commit, project: @project)
@commit = FactoryGirl.create(:ci_commit)
FactoryGirl.create(:ci_build, commit: @commit)
end
 
it 'should return build times in minutes' do
chart = Ci::Charts::BuildTime.new(@project)
chart = Ci::Charts::BuildTime.new(@commit.project)
expect(chart.build_times).to eq([2])
end
end
Loading
Loading
Loading
Loading
@@ -404,10 +404,12 @@ describe Project do
 
describe :ci_commit do
let(:project) { create :project }
let(:ci_project) { create :ci_project, gl_project: project }
let(:commit) { create :ci_commit, project: ci_project }
let(:commit) { create :ci_commit, gl_project: project }
 
before { project.create_gitlab_ci_service(active: true) }
before do
project.ensure_ci_project
project.create_gitlab_ci_service(active: true)
end
 
it { expect(project.ci_commit(commit.sha)).to eq(commit) }
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment