Skip to content

Commit

Permalink
Update radios data-module to govuk-radios
Browse files Browse the repository at this point in the history
This change is required due to new approach to namespacing[0] in V3.0 of
the GOV.UK Design System

[0] alphagov/govuk-frontend#1443
  • Loading branch information
peteryates committed Aug 2, 2019
1 parent d58725f commit 26d92f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/govuk_design_system_formbuilder/containers/radios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(builder, inline:, small:)
end

def html
@builder.content_tag('div', class: radios_classes, data: { module: 'radios' }) do
@builder.content_tag('div', class: radios_classes, data: { module: 'govuk-radios' }) do
yield
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/govuk_design_system_formbuilder/builder/radios_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
end

specify 'radio buttons should be surrounded by a radios module' do
expect(subject).to have_tag('div', with: { 'data-module' => 'radios' }) do |dm|
expect(subject).to have_tag('div', with: { 'data-module' => 'govuk-radios' }) do |dm|
expect(dm).to have_tag('input', count: colours.size, with: { type: 'radio' })
end
end
Expand Down Expand Up @@ -193,7 +193,7 @@
end

specify 'output should contain radio buttons' do
expect(subject).to have_tag('div', with: { class: 'govuk-radios', 'data-module' => 'radios' }) do
expect(subject).to have_tag('div', with: { class: 'govuk-radios', 'data-module' => 'govuk-radios' }) do
expect(subject).to have_tag('input', with: { type: 'radio' }, count: 2)
end
end
Expand Down

0 comments on commit 26d92f0

Please sign in to comment.