diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-21 09:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-21 09:10:13 +0300 |
commit | 38eb51cae9ad5a9ae87d824026362f323c500cb2 (patch) | |
tree | 498d526fd24484f737be7a574304a7e6ab54e8f9 /spec | |
parent | 6575e44cae996d484cbba87a078022768a116db9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/jira_connect/components/groups_list_spec.js | 6 | ||||
-rw-r--r-- | spec/requests/api/group_avatar_spec.rb | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/spec/frontend/jira_connect/components/groups_list_spec.js b/spec/frontend/jira_connect/components/groups_list_spec.js index 4b875928a90..d583fb68771 100644 --- a/spec/frontend/jira_connect/components/groups_list_spec.js +++ b/spec/frontend/jira_connect/components/groups_list_spec.js @@ -160,9 +160,13 @@ describe('GroupsList', () => { expect(findGroupsList().classes()).toContain('gl-opacity-5'); }); - it('sets loading prop of ths search box', () => { + it('sets loading prop of the search box', () => { expect(findSearchBox().props('isLoading')).toBe(true); }); + + it('sets value prop of the search box to the search term', () => { + expect(findSearchBox().props('value')).toBe(mockSearchTeam); + }); }); describe('when group search finishes loading', () => { diff --git a/spec/requests/api/group_avatar_spec.rb b/spec/requests/api/group_avatar_spec.rb index be5cfbc234c..d4088cc31f9 100644 --- a/spec/requests/api/group_avatar_spec.rb +++ b/spec/requests/api/group_avatar_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' RSpec.describe API::GroupAvatar do def avatar_path(group) - "/groups/#{group.id}/avatar" + "/groups/#{ERB::Util.url_encode(group.full_path)}/avatar" end describe 'GET /groups/:id/avatar' do @@ -26,6 +26,16 @@ RSpec.describe API::GroupAvatar do expect(response).to have_gitlab_http_status(:not_found) end end + + context 'when the group is a subgroup' do + it 'returns :ok' do + group = create(:group, :nested, :public, :with_avatar, name: 'g1.1') + + get api(avatar_path(group)) + + expect(response).to have_gitlab_http_status(:ok) + end + end end context 'when the group is private' do |