diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-27 12:22:04 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-03-11 13:20:27 +0300 |
commit | 9ff9047402f0d94a0633ce285123af1a568ced8c (patch) | |
tree | 7103647af99df54eedebbd315afe86b7042379f2 /spec/javascripts/fixtures | |
parent | a89df58527aae693438001ab0800363e7a7d6b07 (diff) |
Merge branch 'winh-dequarantine-labels-autocomplete' into 'master'
Move gfm_autocomplete_spec.rb out of quarantine
Closes #57995 and #56843
See merge request gitlab-org/gitlab-ce!25542
(cherry picked from commit 2dcbc0fa5657ab5c4ed46c5c84b8674faec36ea8)
Diffstat (limited to 'spec/javascripts/fixtures')
-rw-r--r-- | spec/javascripts/fixtures/autocomplete_sources.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/javascripts/fixtures/autocomplete_sources.rb b/spec/javascripts/fixtures/autocomplete_sources.rb new file mode 100644 index 00000000000..c117fb7cd24 --- /dev/null +++ b/spec/javascripts/fixtures/autocomplete_sources.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type: :controller do + include JavaScriptFixturesHelpers + + set(:admin) { create(:admin) } + set(:group) { create(:group, name: 'frontend-fixtures') } + set(:project) { create(:project, namespace: group, path: 'autocomplete-sources-project') } + set(:issue) { create(:issue, project: project) } + + before(:all) do + clean_frontend_fixtures('autocomplete_sources/') + end + + before do + sign_in(admin) + end + + it 'autocomplete_sources/labels.json' do |example| + issue.labels << create(:label, project: project, title: 'bug') + issue.labels << create(:label, project: project, title: 'critical') + + create(:label, project: project, title: 'feature') + create(:label, project: project, title: 'documentation') + + get :labels, + format: :json, + params: { + namespace_id: group.path, + project_id: project.path, + type: issue.class.name, + type_id: issue.id + } + + expect(response).to be_success + store_frontend_fixture(response, example.description) + end +end |