Use project_with_code factory where necessary
This commit is contained in:
parent
9a26e9a0d6
commit
f5dec306fd
8 changed files with 20 additions and 17 deletions
|
@ -46,18 +46,21 @@
|
|||
%span.light ssh:
|
||||
%strong
|
||||
= link_to @project.ssh_url_to_repo
|
||||
%li
|
||||
%span.light fs:
|
||||
%strong
|
||||
= @repository.path_to_repo
|
||||
- if @project.repository.exists?
|
||||
%li
|
||||
%span.light fs:
|
||||
%strong
|
||||
= @repository.path_to_repo
|
||||
|
||||
%li
|
||||
%span.light last commit:
|
||||
%strong
|
||||
- if @repository
|
||||
%li
|
||||
%span.light last commit:
|
||||
%strong
|
||||
= last_commit(@project)
|
||||
- else
|
||||
never
|
||||
- else
|
||||
%li
|
||||
%span.light repository:
|
||||
%strong.cred
|
||||
does not exist
|
||||
|
||||
%li
|
||||
%span.light access:
|
||||
|
|
|
@ -15,7 +15,7 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
Then 'I see commits atom feed' do
|
||||
commit = CommitDecorator.decorate(@project.repository.commit)
|
||||
commit = @project.repository.commit
|
||||
page.response_headers['Content-Type'].should have_content("application/atom+xml")
|
||||
page.body.should have_selector("title", :text => "Recent commits to #{@project.name}")
|
||||
page.body.should have_selector("author email", :text => commit.author_email)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe CommitController do
|
||||
let(:project) { create(:project) }
|
||||
let(:project) { create(:project_with_code) }
|
||||
let(:user) { create(:user) }
|
||||
let(:commit) { project.repository.last_commit_for("master") }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe CommitsController do
|
||||
let(:project) { create(:project) }
|
||||
let(:project) { create(:project_with_code) }
|
||||
let(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe MergeRequestsController do
|
||||
let(:project) { create(:project) }
|
||||
let(:project) { create(:project_with_code) }
|
||||
let(:user) { create(:user) }
|
||||
let(:merge_request) { create(:merge_request_with_diffs, project: project, target_branch: "bcf03b5d~3", source_branch: "bcf03b5d") }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe TreeController do
|
||||
let(:project) { create(:project) }
|
||||
let(:project) { create(:project_with_code) }
|
||||
let(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Gitlab Flavored Markdown" do
|
||||
let(:project) { create(:project) }
|
||||
let(:project) { create(:project_with_code) }
|
||||
let(:issue) { create(:issue, project: project) }
|
||||
let(:merge_request) { create(:merge_request, project: project) }
|
||||
let(:fred) do
|
||||
|
|
|
@ -7,7 +7,7 @@ describe GitlabMarkdownHelper do
|
|||
let!(:project) { create(:project) }
|
||||
|
||||
let(:user) { create(:user, username: 'gfm') }
|
||||
let(:commit) { project.repository.commit) }
|
||||
let(:commit) { project.repository.commit }
|
||||
let(:issue) { create(:issue, project: project) }
|
||||
let(:merge_request) { create(:merge_request, project: project) }
|
||||
let(:snippet) { create(:snippet, project: project) }
|
||||
|
|
Loading…
Reference in a new issue