summaryrefslogtreecommitdiff
path: root/spec/helpers/users_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-02 18:12:20 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-02 18:12:20 +0000
commit3c4d101de003ea292be5ac5baf5d73c6c2747367 (patch)
tree5918d12b69c4bfd84f05a585d62174586a80fd18 /spec/helpers/users_helper_spec.rb
parentb2c21b99c7eb52b5fd906b1e7b4b08d4eb7a296c (diff)
downloadgitlab-ce-3c4d101de003ea292be5ac5baf5d73c6c2747367.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/users_helper_spec.rb')
-rw-r--r--spec/helpers/users_helper_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb
index 07ca362a450..83afeb77bad 100644
--- a/spec/helpers/users_helper_spec.rb
+++ b/spec/helpers/users_helper_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe UsersHelper do
include TermsHelper
- let(:user) { create(:user) }
+ let_it_be(:user) { create(:user, timezone: ActiveSupport::TimeZone::MAPPING['UTC']) }
def filter_ee_badges(badges)
badges.reject { |badge| badge[:text] == 'Is using seat' }
@@ -478,4 +478,17 @@ RSpec.describe UsersHelper do
end
end
end
+
+ describe '#user_profile_tabs_app_data' do
+ before do
+ allow(helper).to receive(:user_calendar_path).with(user, :json).and_return('/users/root/calendar.json')
+ end
+
+ it 'returns expected hash' do
+ expect(helper.user_profile_tabs_app_data(user)).to eq({
+ user_calendar_path: '/users/root/calendar.json',
+ utc_offset: 0
+ })
+ end
+ end
end