diff options
Diffstat (limited to 'spec/helpers/learn_gitlab_helper_spec.rb')
-rw-r--r-- | spec/helpers/learn_gitlab_helper_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/helpers/learn_gitlab_helper_spec.rb b/spec/helpers/learn_gitlab_helper_spec.rb index 7c9dfd6b5be..0d4f1965d92 100644 --- a/spec/helpers/learn_gitlab_helper_spec.rb +++ b/spec/helpers/learn_gitlab_helper_spec.rb @@ -7,16 +7,16 @@ RSpec.describe LearnGitlabHelper do include Devise::Test::ControllerHelpers let_it_be(:user) { create(:user) } - let_it_be(:project) { create(:project, name: LearnGitlab::Project::PROJECT_NAME, namespace: user.namespace) } + let_it_be(:project) { create(:project, name: Onboarding::LearnGitlab::PROJECT_NAME, namespace: user.namespace) } let_it_be(:namespace) { project.namespace } before do - allow_next_instance_of(LearnGitlab::Project) do |learn_gitlab| + allow_next_instance_of(Onboarding::LearnGitlab) do |learn_gitlab| allow(learn_gitlab).to receive(:project).and_return(project) end - OnboardingProgress.onboard(namespace) - OnboardingProgress.register(namespace, :git_write) + Onboarding::Progress.onboard(namespace) + Onboarding::Progress.register(namespace, :git_write) end describe '#learn_gitlab_enabled?' do @@ -37,8 +37,8 @@ RSpec.describe LearnGitlabHelper do with_them do before do - allow(OnboardingProgress).to receive(:onboarding?).with(project.namespace).and_return(onboarding) - allow_next(LearnGitlab::Project, user).to receive(:available?).and_return(learn_gitlab_available) + allow(Onboarding::Progress).to receive(:onboarding?).with(project.namespace).and_return(onboarding) + allow_next(Onboarding::LearnGitlab, user).to receive(:available?).and_return(learn_gitlab_available) end context 'when signed in' do @@ -81,7 +81,7 @@ RSpec.describe LearnGitlabHelper do it 'has all section data', :aggregate_failures do expect(onboarding_sections_data.keys).to contain_exactly(:deploy, :plan, :workspace) - expect(onboarding_sections_data.values.map { |section| section.keys }).to match_array([[:svg]] * 3) + expect(onboarding_sections_data.values.map(&:keys)).to match_array([[:svg]] * 3) end it 'has all project data', :aggregate_failures do |