diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 15:10:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 15:10:37 +0300 |
commit | a4db97517ad095914c0652a07486ac607d99dab4 (patch) | |
tree | 58f57b42c52b1b4231cab44ef3934cbe55991d25 /spec/helpers | |
parent | 17295c75a1a28df78f719e0098dd31fe45ce0446 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/organizations/organization_helper_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/helpers/organizations/organization_helper_spec.rb b/spec/helpers/organizations/organization_helper_spec.rb index 594013d515b..a3613e29da9 100644 --- a/spec/helpers/organizations/organization_helper_spec.rb +++ b/spec/helpers/organizations/organization_helper_spec.rb @@ -31,13 +31,18 @@ RSpec.describe Organizations::OrganizationHelper, feature_category: :cell do end it 'returns expected json' do + expect(organization).to receive(:avatar_url).with(size: 128).and_return('avatar.jpg') expect( Gitlab::Json.parse( helper.organization_show_app_data(organization) ) ).to eq( { - 'organization' => { 'id' => organization.id, 'name' => organization.name }, + 'organization' => { + 'id' => organization.id, + 'name' => organization.name, + 'avatar_url' => 'avatar.jpg' + }, 'groups_and_projects_organization_path' => '/-/organizations/default/groups_and_projects', 'new_group_path' => new_group_path, 'new_project_path' => new_project_path, @@ -107,12 +112,14 @@ RSpec.describe Organizations::OrganizationHelper, feature_category: :cell do describe '#organization_settings_general_app_data' do it 'returns expected json' do + expect(organization).to receive(:avatar_url).with(size: 192).and_return('avatar.jpg') expect(Gitlab::Json.parse(helper.organization_settings_general_app_data(organization))).to eq( { 'organization' => { 'id' => organization.id, 'name' => organization.name, - 'path' => organization.path + 'path' => organization.path, + 'avatar' => 'avatar.jpg' }, 'organizations_path' => organizations_path, 'root_url' => root_url |