bcms_webdav 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -178,7 +178,7 @@ module Bcms
178
178
 
179
179
  def child_node(section_node)
180
180
  node_object = section_node.node
181
- return nil if node_object && node_object.is_a?(Link)
181
+ return nil if node_object == nil || node_object.is_a?(Link)
182
182
  child_node = self.class.new(node_object.path, node_object.path, request, response, options.merge(:user => @user))
183
183
  child_node.exist? # Force lookup of info from DB.
184
184
  child_node
@@ -145,6 +145,11 @@ class WebDavSectionResourceTest < ActiveSupport::TestCase
145
145
  assert_equal 0, @resource.children.size
146
146
 
147
147
  end
148
+
149
+ test "Section_nodes will nil values shouldn't throw errors" do
150
+
151
+ assert_equal nil, @resource.send(:child_node, SectionNode.new(:section=>@about_us, :node=>nil))
152
+ end
148
153
 
149
154
  private
150
155
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcms_webdav
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - BrowserMedia