summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-18 15:33:52 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-05-18 15:33:52 +0800
commit54a8cbddb16338bf48aa04143566ccd33646d769 (patch)
tree82fe3eb4b1b6a8bade602f8f17e488564e6cd2a7 /spec/views
parent226b517ce70674a1c25084b8535dd6869addb21e (diff)
parentc9e61fa3cd8eeb63aced9a55039dc4d17616cd42 (diff)
downloadgitlab-ce-54a8cbddb16338bf48aa04143566ccd33646d769.tar.gz
Merge remote-tracking branch 'upstream/master' into rename-builds-controller
* upstream/master: (31 commits) Remove 'no changes' entries from changelog Check if OLD is set when migrating issue assignees Fix data migration from trigger schedules Replace EFS section in AWS guide Add warning about AWS EFS and performance Consolidate opening text from about.gitlab.com and add active/passive note Fix invalid object reference in ee_compat_check script Fix Ordered Task List Items Add auxiliary viewer for README Update fe_guide testing.md Add auxiliary blob viewer for CHANGELOG Add spec for last commit info when browsing repository files Show last commit for current tree on tree page Use same last commit widget on project homepage and tree view Fix unassigned checkmark Add missing changelog for iPython notebook rendering feature Convert fa-history to svg; tweak alignment Get rid of pluck in app/services/members/authorized_destroy_service.rb Removes duplicate environment variable in documentation Fixed spacing issues in issue sidebar ...
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/_last_commit.html.haml_spec.rb22
-rw-r--r--spec/views/projects/tree/show.html.haml_spec.rb6
2 files changed, 3 insertions, 25 deletions
diff --git a/spec/views/projects/_last_commit.html.haml_spec.rb b/spec/views/projects/_last_commit.html.haml_spec.rb
deleted file mode 100644
index eea1695b171..00000000000
--- a/spec/views/projects/_last_commit.html.haml_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-
-describe 'projects/_last_commit', :view do
- let(:project) { create(:project, :repository) }
-
- context 'when there is a pipeline present for the commit' do
- context 'when pipeline is blocked' do
- let!(:pipeline) do
- create(:ci_pipeline, :blocked, project: project,
- sha: project.commit.id)
- end
-
- it 'shows correct pipeline badge' do
- render 'projects/last_commit', commit: project.commit,
- project: project,
- ref: :master
-
- expect(rendered).to have_text "blocked #{project.commit.short_id}"
- end
- end
- end
-end
diff --git a/spec/views/projects/tree/show.html.haml_spec.rb b/spec/views/projects/tree/show.html.haml_spec.rb
index 835a93e620e..33eba3e6d3d 100644
--- a/spec/views/projects/tree/show.html.haml_spec.rb
+++ b/spec/views/projects/tree/show.html.haml_spec.rb
@@ -21,11 +21,11 @@ describe 'projects/tree/show' do
let(:tree) { repository.tree(commit.id, path) }
before do
+ assign(:id, File.join(ref, path))
assign(:ref, ref)
- assign(:commit, commit)
- assign(:id, commit.id)
- assign(:tree, tree)
assign(:path, path)
+ assign(:last_commit, commit)
+ assign(:tree, tree)
end
it 'displays correctly' do