Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-04 10:54:42 +0300
committerPhil Hughes <me@iamphill.com>2017-05-04 10:54:42 +0300
commitfdacc4ee6a3341b2c44ddd85a41f2a04d0d417ad (patch)
tree337451ec4cf566000b15a8a04212849a0e18a5a7 /spec/views/projects/tags
parent9ee274c03166b5773d433e3947b5d566fda02e53 (diff)
Moved to a view spec
Diffstat (limited to 'spec/views/projects/tags')
-rw-r--r--spec/views/projects/tags/index.html.haml_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/views/projects/tags/index.html.haml_spec.rb b/spec/views/projects/tags/index.html.haml_spec.rb
new file mode 100644
index 00000000000..33122365e9a
--- /dev/null
+++ b/spec/views/projects/tags/index.html.haml_spec.rb
@@ -0,0 +1,20 @@
+require 'spec_helper'
+
+describe 'projects/tags/index', :view do
+ let(:project) { create(:project) }
+
+ before do
+ assign(:project, project)
+ assign(:repository, project.repository)
+ assign(:tags, [])
+
+ allow(view).to receive(:current_ref).and_return('master')
+ allow(view).to receive(:can?).and_return(false)
+ end
+
+ it 'defaults sort dropdown toggle to last updated' do
+ render
+
+ expect(rendered).to have_button('Last updated')
+ end
+end