diff options
author | Robert Speicher <robert@gitlab.com> | 2017-05-04 17:07:59 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-05-04 17:07:59 +0300 |
commit | 50b89fc5b0dbd165d8e734c48639287428cad576 (patch) | |
tree | dfbb81a839d1311d4d7cd9c809b0c8b8812be517 /spec/views | |
parent | 37b1b14a167de18e35810f4728bbf8d70920ffca (diff) | |
parent | fdacc4ee6a3341b2c44ddd85a41f2a04d0d417ad (diff) |
Merge branch 'tags-sort-default' into 'master'
Fixed tags sort dropdown being empty
Closes #31618
See merge request !11055
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/tags/index.html.haml_spec.rb | 20 |
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 |