summaryrefslogtreecommitdiff
path: root/spec/views/projects
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-04 08:54:42 +0100
committerPhil Hughes <me@iamphill.com>2017-05-04 08:54:42 +0100
commitfdacc4ee6a3341b2c44ddd85a41f2a04d0d417ad (patch)
tree337451ec4cf566000b15a8a04212849a0e18a5a7 /spec/views/projects
parent9ee274c03166b5773d433e3947b5d566fda02e53 (diff)
downloadgitlab-ce-fdacc4ee6a3341b2c44ddd85a41f2a04d0d417ad.tar.gz
Moved to a view spectags-sort-default
Diffstat (limited to 'spec/views/projects')
-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