Sha256: 9a63ce68e02e41950ffcdd28af80bc12f47467882d12f24d08da7ad5a8d33fce

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

require File.expand_path('../test_helper', File.dirname(__FILE__))

class RenderCmsSeedTest < ActionDispatch::IntegrationTest
  
  def test_render_with_seed_data_enabled
    get '/child/subchild'
    assert_response 404
    
    ComfortableMexicanSofa.configuration.seed_data_path = File.expand_path('../cms_seeds', File.dirname(__FILE__))
    
    get '/child/subchild'
    assert_response :success
    assert_equal '<html><div>Sub Child Page Content Content for Default Snippet</div></html>', response.body
  end
  
  def test_get_seed_data_page
    ComfortableMexicanSofa.configuration.seed_data_path = File.expand_path('../cms_seeds', File.dirname(__FILE__))
    
    get '/'
    assert_response :success
    assert assigns(:cms_page)
    assert assigns(:cms_page).new_record?
  end
  
  def test_get_seed_data_css
    ComfortableMexicanSofa.configuration.seed_data_path = File.expand_path('../cms_seeds', File.dirname(__FILE__))
    
    get '/cms-css/default'
    assert_response :success
    assert assigns(:cms_layout)
    assert assigns(:cms_layout).new_record?
  end
  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.0.51 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.50 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.49 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.48 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.47 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.46 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.45 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.44 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.43 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.42 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.41 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.40 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.39 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.38 test/integration/render_cms_seed_test.rb
comfortable_mexican_sofa-1.0.37 test/integration/render_cms_seed_test.rb