diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-24 21:09:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-24 21:09:05 +0300 |
commit | c2367afbf57ebc65d5b78a743b5d6a91f0aece9f (patch) | |
tree | 165c2c54bf72ab3a3a9417d97f63ece5c9eba9f5 /spec/support/shared_examples/requests | |
parent | 51a9512965d86e3094968fa514e4ae8a96d38cf3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/requests')
-rw-r--r-- | spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb b/spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb index 6044fefd2f7..90ac60a6fe7 100644 --- a/spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb @@ -89,4 +89,24 @@ RSpec.shared_examples 'group and project boards query' do end end end + + context 'when querying for a single board' do + before do + board_parent.add_reporter(current_user) + end + + it_behaves_like 'a working graphql query' do + before do + post_graphql(query_single_board, current_user: current_user) + end + end + + it 'finds the correct board' do + board = create(:board, resource_parent: board_parent, name: 'A') + + post_graphql(query_single_board("id: \"#{global_id_of(board)}\""), current_user: current_user) + + expect(board_data['name']).to eq board.name + end + end end |