diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-28 21:10:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-28 21:10:45 +0000 |
commit | 71d6b9014bef64436bbd996667e6458ebde561c4 (patch) | |
tree | 21b049d24b2d96be84904576e2b619f82d5d515d /spec/models/hooks | |
parent | 0076bbc67375ff1507e42ce479406daf92c0a6a2 (diff) | |
download | gitlab-ce-71d6b9014bef64436bbd996667e6458ebde561c4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/hooks')
-rw-r--r-- | spec/models/hooks/web_hook_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/models/hooks/web_hook_spec.rb b/spec/models/hooks/web_hook_spec.rb index 3ca41e613fa..8c802628559 100644 --- a/spec/models/hooks/web_hook_spec.rb +++ b/spec/models/hooks/web_hook_spec.rb @@ -299,7 +299,7 @@ RSpec.describe WebHook do end describe '#executable?' do - let(:web_hook) { create(:project_hook, project: project) } + let_it_be_with_reload(:web_hook) { create(:project_hook, project: project) } where(:recent_failures, :not_until, :executable) do [ @@ -757,4 +757,14 @@ RSpec.describe WebHook do expect { described_class.new.update_last_failure }.not_to raise_error end end + + describe '#masked_token' do + it { expect(hook.masked_token).to be_nil } + + context 'with a token' do + let(:hook) { build(:project_hook, :token, project: project) } + + it { expect(hook.masked_token).to eq described_class::SECRET_MASK } + end + end end |