Commit fdacc4ee authored by Phil Hughes's avatar Phil Hughes

Moved to a view spec

parent 9ee274c0
- @no_container = true
- @sort ||= sort_value_recently_updated
- page_title "Tags"
= render "projects/commits/head"
......
require 'spec_helper'
feature 'Tags sort dropdown', :feature do
let(:project) { create(:project) }
before do
login_as(:admin)
visit namespace_project_tags_path(project.namespace, project)
end
it 'defaults sort dropdown to last updated' do
expect(page).to have_button('Last updated')
end
end
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment