Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issuable_search_shared_examples.rb « graphql « api « requests « shared_examples « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 22805cf7aedf4b15f4e9d4eec6048905f6926dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# Requires `query(params)` , `user`, `issuable_data` and `issuable` bindings
RSpec.shared_examples 'query with a search term' do
  it 'returns only matching issuables' do
    filter_params = { search: 'bar', in: [:DESCRIPTION] }
    graphql_query = query(filter_params)

    post_graphql(graphql_query, current_user: user)
    ids = graphql_dig_at(issuable_data, :node, :id)

    expect(ids).to contain_exactly(issuable.to_global_id.to_s)
  end
end