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>2019-10-17 15:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 15:07:33 +0300
commit6b75320f525f841454f1ab162d141d3610f2e77b (patch)
tree4971c27759e4fbc18b85e71800c3b9c12346317e /spec/views/events
parent4226aca420920c1844e8eade4798a2dff188a6fc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/events')
-rw-r--r--spec/views/events/event/_push.html.haml_spec.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/views/events/event/_push.html.haml_spec.rb b/spec/views/events/event/_push.html.haml_spec.rb
index e43e37188a3..d33a8aa86fc 100644
--- a/spec/views/events/event/_push.html.haml_spec.rb
+++ b/spec/views/events/event/_push.html.haml_spec.rb
@@ -28,6 +28,23 @@ describe 'events/event/_push.html.haml' do
expect(rendered).not_to have_link(event.ref_name)
end
end
+
+ context 'ref_count is more than 1' do
+ let(:payload) do
+ build_stubbed(
+ :push_event_payload,
+ event: event,
+ ref_count: 4,
+ ref_type: :branch
+ )
+ end
+
+ it 'includes the count in the text' do
+ render partial: 'events/event/push', locals: { event: event }
+
+ expect(rendered).to include('4 branches')
+ end
+ end
end
context 'with a tag' do
@@ -53,5 +70,22 @@ describe 'events/event/_push.html.haml' do
expect(rendered).not_to have_link(event.ref_name)
end
end
+
+ context 'ref_count is more than 1' do
+ let(:payload) do
+ build_stubbed(
+ :push_event_payload,
+ event: event,
+ ref_count: 4,
+ ref_type: :tag
+ )
+ end
+
+ it 'includes the count in the text' do
+ render partial: 'events/event/push', locals: { event: event }
+
+ expect(rendered).to include('4 tags')
+ end
+ end
end
end