Sha256: 93ba5722055382c28b52a9609ca61866c580060f90a29304c72ecc498e8d14f3

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 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
    
    LucyCms.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
    LucyCms.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
    LucyCms.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

3 entries across 3 versions & 1 rubygems

Version Path
lucy_cms-0.0.6 test/integration/render_cms_seed_test.rb
lucy_cms-0.0.5 test/integration/render_cms_seed_test.rb
lucy_cms-0.0.4 test/integration/render_cms_seed_test.rb