summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/discussions_provider_shared_examples.rb
blob: 77cf1ac3f51e604984f217801d26ab78d5a170b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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