govuk_content_models 9.0.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 9.0.1
2
+
3
+ * Bugfix: `whole_body` can return nil for CompletedTransactionEdition because the body field is no longer used.
4
+
1
5
  ## 9.0.0
2
6
 
3
7
  * Removes `business_support_identifier` field from BusinessSupportEdition.
@@ -186,7 +186,7 @@ module Workflow
186
186
  end
187
187
 
188
188
  def edition_changes
189
- if self.whole_body.empty?
189
+ if self.whole_body.blank?
190
190
  false
191
191
  else
192
192
  my_body, their_body = [self, self.published_edition].map do |edition|
@@ -1,4 +1,4 @@
1
1
  module GovukContentModels
2
2
  # Changing this causes Jenkins to tag and release the gem into the wild
3
- VERSION = "9.0.0"
3
+ VERSION = "9.0.1"
4
4
  end
@@ -347,6 +347,11 @@ class WorkflowTest < ActiveSupport::TestCase
347
347
  assert_equal "badger\n\nmushroom\n\nsnake\n\nend", edition_two.edition_changes.to_s
348
348
  end
349
349
 
350
+ test "edition_changes should return false if the whole body is nil" do
351
+ edition = FactoryGirl.create(:completed_transaction_edition, body: nil)
352
+ refute edition.edition_changes
353
+ end
354
+
350
355
  test "an edition can be moved into archive state" do
351
356
  user, other_user = template_users
352
357
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-27 00:00:00.000000000 Z
12
+ date: 2014-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bson_ext
@@ -463,7 +463,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
463
463
  version: '0'
464
464
  segments:
465
465
  - 0
466
- hash: 2687494415806384648
466
+ hash: 2591551071857125687
467
467
  required_rubygems_version: !ruby/object:Gem::Requirement
468
468
  none: false
469
469
  requirements:
@@ -472,7 +472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
472
472
  version: '0'
473
473
  segments:
474
474
  - 0
475
- hash: 2687494415806384648
475
+ hash: 2591551071857125687
476
476
  requirements: []
477
477
  rubyforge_project:
478
478
  rubygems_version: 1.8.23