diff options
author | Patrick Derichs <pderichs@gitlab.com> | 2019-07-30 20:25:49 +0200 |
---|---|---|
committer | Patrick Derichs <pderichs@gitlab.com> | 2019-08-01 10:42:42 +0200 |
commit | 0e99daae4afdb90d74c4b0bfe5cb3e482bbb422e (patch) | |
tree | f6170c10e6e6e657425c3d484eabd04d57c87bb0 /spec/support | |
parent | 533237a097281dbe4fb1c821d5823c4de8c8f6af (diff) | |
download | gitlab-ce-0e99daae4afdb90d74c4b0bfe5cb3e482bbb422e.tar.gz |
Use NotesFinder in IssuableActions module
Remove project from NotesFinder constructor
Add project parameter to specs
Also look for methods in private scope
Fix specs to match new NotesFinder constructor
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/discussions_provider_shared_examples.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/shared_examples/discussions_provider_shared_examples.rb b/spec/support/shared_examples/discussions_provider_shared_examples.rb new file mode 100644 index 00000000000..77cf1ac3f51 --- /dev/null +++ b/spec/support/shared_examples/discussions_provider_shared_examples.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +shared_examples 'discussions provider' do + it 'returns the expected discussions' do + get :discussions, params: { namespace_id: project.namespace, project_id: project, id: requested_iid } + + expect(response).to have_gitlab_http_status(200) + expect(response).to match_response_schema('entities/discussions') + + expect(json_response.size).to eq(expected_discussion_count) + expect(json_response.pluck('id')).to eq(expected_discussion_ids) + end +end |