govuk_content_models 16.1.0 → 16.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +4 -0
- data/app/models/tag.rb +1 -1
- data/lib/govuk_content_models/version.rb +1 -1
- data/test/models/tag_test.rb +7 -0
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/app/models/tag.rb
CHANGED
data/test/models/tag_test.rb
CHANGED
|
@@ -128,6 +128,13 @@ class TagTest < ActiveSupport::TestCase
|
|
|
128
128
|
assert_includes Tag.validators.map(&:class), TagIdValidator
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
+
test "#parent returns the parent even if the parent is draft" do
|
|
132
|
+
parent = FactoryGirl.create(:tag, state: 'draft')
|
|
133
|
+
child = FactoryGirl.create(:tag, state: 'draft', parent_id: parent.tag_id)
|
|
134
|
+
|
|
135
|
+
assert_equal parent, child.parent
|
|
136
|
+
end
|
|
137
|
+
|
|
131
138
|
context "state" do
|
|
132
139
|
setup do
|
|
133
140
|
@atts = { tag_type: 'section', tag_id: 'test', title: 'Test' }
|
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: 16.1.
|
|
4
|
+
version: 16.1.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-07-
|
|
12
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bson_ext
|
|
@@ -466,7 +466,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
466
466
|
version: '0'
|
|
467
467
|
segments:
|
|
468
468
|
- 0
|
|
469
|
-
hash: -
|
|
469
|
+
hash: -3793855121358721402
|
|
470
470
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
471
471
|
none: false
|
|
472
472
|
requirements:
|
|
@@ -475,7 +475,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
475
475
|
version: '0'
|
|
476
476
|
segments:
|
|
477
477
|
- 0
|
|
478
|
-
hash: -
|
|
478
|
+
hash: -3793855121358721402
|
|
479
479
|
requirements: []
|
|
480
480
|
rubyforge_project:
|
|
481
481
|
rubygems_version: 1.8.23
|