Skip to content

Commit

Permalink
fixed all errors with structure controller tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Mar 29, 2011
1 parent 0038499 commit c637ac9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Expand Up @@ -177,9 +177,9 @@ def deny_access!

# Activate the appropriate database for the current request
def activate_domain(domain=nil)

# modify the params[:path] to be an array
params[:path] = params[:path].to_s.split("/")
params[:path] ||= []
params[:path] = params[:path].to_s.split("/") unless params[:path].is_a?(Array)

# Cancel out of domain activations
# if we are testing
Expand Down
3 changes: 1 addition & 2 deletions app/models/wizards/simple_site.rb
Expand Up @@ -11,13 +11,12 @@ def self.structure_wizard_handler_info

attributes :pages => [], :name => nil


options_form(
fld(:pages, :text_area),
fld(:name, :text_field, :label => 'Website Name')
)

def validate
validate do
self.errors.add(:name, 'is missing') if self.name.blank?
self.errors.add(:pages, 'are missing') if self.pages.blank?
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/structure/_edit_page_revision.html.erb
Expand Up @@ -2,7 +2,7 @@

<h3><%= 'Edit Meta Data'.t %></h3>

<%= remote_cms_form_for :revision, @revision, :update => 'WD_redbox' do |f| -%>
<%= cms_form_for :revision, @revision, :remote => true, :update => 'WD_redbox' do |f| -%>
<%= f.text_field :title %>
<%= f.text_field :menu_title %>
<%= f.text_area :meta_description, :rows => 3 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/structure/_site_node_options.rhtml
@@ -1,7 +1,7 @@
<br/>

<div id='site_node_view'>
<%= remote_cms_form_for :site_node, @node,
<%= cms_form_for :site_node, @node, :remote => true,
:update => "element_info",
:method => 'post',
:url => { :action => 'update_site_node_options', :path => @node.id } do |nf| -%>
Expand Down
1 change: 0 additions & 1 deletion spec/controllers/structure_controller_spec.rb
Expand Up @@ -3,7 +3,6 @@
describe StructureController do
render_views


reset_domain_tables :site_versions, :site_nodes, :site_node_modifiers, :page_revisions, :page_paragraphs


Expand Down
1 change: 1 addition & 0 deletions spec/lib/site_node_engine_spec.rb
@@ -1,6 +1,7 @@
require "spec_helper"

describe SiteNodeEngine, :type => :controller do
include RSpec::Rails::ControllerExampleGroup
include ActionDispatch::TestProcess

render_views
Expand Down

0 comments on commit c637ac9

Please sign in to comment.