diff options
Diffstat (limited to 'spec/requests/api/graphql/group')
-rw-r--r-- | spec/requests/api/graphql/group/group_members_spec.rb | 9 | ||||
-rw-r--r-- | spec/requests/api/graphql/group/packages_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/graphql/group/work_item_types_spec.rb | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/spec/requests/api/graphql/group/group_members_spec.rb b/spec/requests/api/graphql/group/group_members_spec.rb index bab8d5b770c..5f8becc0726 100644 --- a/spec/requests/api/graphql/group/group_members_spec.rb +++ b/spec/requests/api/graphql/group/group_members_spec.rb @@ -156,13 +156,20 @@ RSpec.describe 'getting group members information' do expect_array_response(child_user) end - it 'returns invited members plus inherited members' do + it 'returns invited members and inherited members of a shared group' do fetch_members(group: child_group, args: { relations: [:DIRECT, :INHERITED, :SHARED_FROM_GROUPS] }) expect(graphql_errors).to be_nil expect_array_response(invited_user, user_1, user_2, child_user) end + it 'returns invited members and inherited members of an ancestor of a shared group' do + fetch_members(group: grandchild_group, args: { relations: [:DIRECT, :INHERITED, :SHARED_FROM_GROUPS] }) + + expect(graphql_errors).to be_nil + expect_array_response(grandchild_user, invited_user, user_1, user_2, child_user) + end + it 'returns direct and inherited members' do fetch_members(group: child_group, args: { relations: [:DIRECT, :INHERITED] }) diff --git a/spec/requests/api/graphql/group/packages_spec.rb b/spec/requests/api/graphql/group/packages_spec.rb index adee556db3a..cf8736db5af 100644 --- a/spec/requests/api/graphql/group/packages_spec.rb +++ b/spec/requests/api/graphql/group/packages_spec.rb @@ -39,7 +39,7 @@ RSpec.describe 'getting a package list for a group' do it 'returns an error for the second group and data for the first' do expect(a_packages_names).to contain_exactly(group_one_package.name) - expect_graphql_errors_to_include [/Packages can be requested only for one group at a time/] + expect_graphql_errors_to_include [/"packages" field can be requested only for 1 Group\(s\) at a time./] expect(graphql_data_at(:b, :packages)).to be(nil) end end diff --git a/spec/requests/api/graphql/group/work_item_types_spec.rb b/spec/requests/api/graphql/group/work_item_types_spec.rb index a33e3ae5427..d6b0673e4f8 100644 --- a/spec/requests/api/graphql/group/work_item_types_spec.rb +++ b/spec/requests/api/graphql/group/work_item_types_spec.rb @@ -46,7 +46,7 @@ RSpec.describe 'getting a list of work item types for a group' do end end - context "when user doesn't have acces to the group" do + context "when user doesn't have access to the group" do let(:current_user) { create(:user) } before do |