diff options
Diffstat (limited to 'spec/controllers/projects/badges_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/badges_controller_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/controllers/projects/badges_controller_spec.rb b/spec/controllers/projects/badges_controller_spec.rb index d41e8d6169f..ef2afd7ca38 100644 --- a/spec/controllers/projects/badges_controller_spec.rb +++ b/spec/controllers/projects/badges_controller_spec.rb @@ -98,6 +98,16 @@ RSpec.describe Projects::BadgesController do expect(response.body).to include('123') end end + + if badge_type == :release + context 'when value_width param is used' do + it 'sets custom value width' do + get_badge(badge_type, value_width: '123') + + expect(response.body).to include('123') + end + end + end end shared_examples 'a badge resource' do |badge_type| @@ -186,7 +196,7 @@ RSpec.describe Projects::BadgesController do namespace_id: project.namespace.to_param, project_id: project, ref: pipeline.ref - }.merge(args.slice(:style, :key_text, :key_width, :ignore_skipped)) + }.merge(args.slice(:style, :key_text, :key_width, :value_width, :ignore_skipped)) get badge, params: params, format: :svg end |