Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-04 12:09:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-04 12:09:36 +0300
commitf9fe7cda4bdbc477d8d76e5def4023f7d03bab46 (patch)
tree293285f6f438a22e7beb35ef8cf5e1ffae131094 /spec/helpers
parenta2f16969fa9bb982d5ec01f18efff5eabfc89a67 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/whats_new_helper_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/helpers/whats_new_helper_spec.rb b/spec/helpers/whats_new_helper_spec.rb
index cdb4fc60629..017826921ff 100644
--- a/spec/helpers/whats_new_helper_spec.rb
+++ b/spec/helpers/whats_new_helper_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe WhatsNewHelper do
let(:release_item) { double(:item) }
before do
- allow(ReleaseHighlight).to receive(:most_recent_version).and_return(84.0)
+ allow(ReleaseHighlight).to receive(:versions).and_return([84.0])
end
it { is_expected.to eq('display-whats-new-notification-84.0') }
@@ -18,7 +18,7 @@ RSpec.describe WhatsNewHelper do
context 'when most recent release highlights do NOT exist' do
before do
- allow(ReleaseHighlight).to receive(:most_recent_version).and_return(nil)
+ allow(ReleaseHighlight).to receive(:versions).and_return(nil)
end
it { is_expected.to be_nil }
@@ -44,4 +44,14 @@ RSpec.describe WhatsNewHelper do
end
end
end
+
+ describe '#whats_new_versions' do
+ let(:versions) { [84.0] }
+
+ it 'returns ReleaseHighlight.versions' do
+ expect(ReleaseHighlight).to receive(:versions).and_return(versions)
+
+ expect(helper.whats_new_versions).to eq(versions)
+ end
+ end
end