Skip to content

Commit

Permalink
Updated the edit tests to use the position field
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Aug 12, 2010
1 parent 6ea512d commit 3856a71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -36,9 +36,9 @@
@model = SimpleContentModel.create :name => 'Test'

fields = []
@field_types.each do |type|
@field_types.each_with_index do |type, idx|
content_field = ContentModel.content_field('content/core_field', type[1].to_s)
fields << {:name => type[0].to_s, :field_type => type[1].to_s, :field_module => 'content/core_field'}
fields[idx] = {:name => type[0].to_s, :field_type => type[1].to_s, :field_module => 'content/core_field', :position => idx}
end

post 'edit', :path => [@model.id], :content_model => {:content_model_fields => fields}
Expand Down
Expand Up @@ -38,7 +38,7 @@
fields = {}
@field_types.each_with_index do |type, idx|
content_field = ContentModel.content_field('content/core_field', type[1].to_s)
fields[idx] = {:name => type[0].to_s, :field_type => type[1].to_s, :field_module => 'content/core_field'}
fields[idx] = {:name => type[0].to_s, :field_type => type[1].to_s, :field_module => 'content/core_field', :position => idx}
end

post 'edit', :path => [@model.id], :content_model => {:content_model_fields => fields}
Expand Down

0 comments on commit 3856a71

Please sign in to comment.