diff options
author | Sean McGivern <sean@gitlab.com> | 2016-07-26 16:31:25 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-07-26 16:31:25 +0100 |
commit | e44bbcb99419357adbab798e7435f61e1c8047d7 (patch) | |
tree | e1a9cc7daef40e9663e91f750c29fe2ef07c3715 /spec/controllers/projects/tags_controller_spec.rb | |
parent | 8a95f1f32cd5d93044f4b7b4c9b606267910df79 (diff) | |
download | gitlab-ce-e44bbcb99419357adbab798e7435f61e1c8047d7.tar.gz |
Show release notes in tag list
A release's tag reference is just the name of the tag, not the entire
tag object.
This also fixes the tags index if a tag's message contains non-UTF8 byte
sequences.
Diffstat (limited to 'spec/controllers/projects/tags_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/tags_controller_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/controllers/projects/tags_controller_spec.rb b/spec/controllers/projects/tags_controller_spec.rb new file mode 100644 index 00000000000..a6995145cc1 --- /dev/null +++ b/spec/controllers/projects/tags_controller_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe Projects::TagsController do + let(:project) { create(:project, :public) } + let!(:release) { create(:release, project: project) } + let!(:invalid_release) { create(:release, project: project, tag: 'does-not-exist') } + + describe 'GET index' do + before { get :index, namespace_id: project.namespace.to_param, project_id: project.to_param } + + it 'returns the tags for the page' do + expect(assigns(:tags).map(&:name)).to eq(['v1.1.0', 'v1.0.0']) + end + + it 'returns releases matching those tags' do + expect(assigns(:releases)).to include(release) + expect(assigns(:releases)).not_to include(invalid_release) + end + end +end |