Permalink
Browse files

Merge pull request #66 from alphagov/add_extended_flag_checkbox

Add extended font flag checkbox
  • Loading branch information...
2 parents 544bcb7 + a9d448a commit 35c14fb5ddaf7bd8ecd1b9535d7a8d80c70f28a4 @KushalP KushalP committed Mar 19, 2013
Showing with 6 additions and 3 deletions.
  1. +1 −1 Gemfile
  2. +2 −2 Gemfile.lock
  3. +1 −0 app/views/artefacts/_form.html.erb
  4. +2 −0 test/integration/artefacts_api_test.rb
View
@@ -31,7 +31,7 @@ gem 'lograge', '~> 0.1.0'
if ENV['CONTENT_MODELS_DEV']
gem "govuk_content_models", path: '../govuk_content_models'
else
- gem "govuk_content_models", "4.10.2"
+ gem "govuk_content_models", "4.11.0"
end
if ENV['BUNDLE_DEV']
View
@@ -120,7 +120,7 @@ GEM
htmlentities (~> 4)
kramdown (~> 0.13.3)
sanitize (= 2.0.3)
- govuk_content_models (4.10.2)
+ govuk_content_models (4.11.0)
bson_ext
differ
gds-api-adapters
@@ -322,7 +322,7 @@ DEPENDENCIES
gds-api-adapters (= 4.1.3)
gds-sso (= 3.0.0)
gelf
- govuk_content_models (= 4.10.2)
+ govuk_content_models (= 4.11.0)
jquery-rails (= 2.0.2)
jquery-ui-rails (= 3.0.1)
launchy
@@ -23,6 +23,7 @@
<%= f.input :name, :input_html => { :class => "span6", :disabled => f.object.persisted?}, :hint => name_hint_for(f.object) %>
<%= f.input :description, :input_html => { :class => "span6", :disabled => true, :rows => 6 }, :hint => 'Managed through API and/or owning app', :as => :text %>
<%= f.input :slug, :input_html => { :class => "span6", :disabled => f.object.live? }, :hint => "A valid slug might look like this: i-am-a-good-slug-with-no-spaces" %>
+ <%= f.input :need_extended_font, :label => "Does this artefact need the extra font files?", :as => :boolean %>
<%= f.input :need_id, :input_html => { :class => "span6", :disabled => f.object.persisted? } %>
<% if ! artefact.new_record? && ! artefact.business_proposition %>
<%= link_to "View in Need-O-Tron", need_url(f.object), :rel => 'external', :class => "btn btn-primary" %>
@@ -17,6 +17,7 @@ class ArtefactsAPITest < ActiveSupport::TestCase
'owning_app' => 'publisher',
'rendering_app' => 'frontend',
'state' => 'draft',
+ 'need_extended_font' => false
}
# Rack::Test put method calls to_json on whatever body you pass.
@@ -34,6 +35,7 @@ class ArtefactsAPITest < ActiveSupport::TestCase
assert_equal 'publisher', artefact.owning_app
assert_equal 'frontend', artefact.rendering_app
assert_equal 'draft', artefact.state
+ assert_equal false, artefact.need_extended_font
end
should "return an error if creating an artefact fails" do

0 comments on commit 35c14fb

Please sign in to comment.