# encoding: UTF-8
require 'spec_helper'

feature 'Home' do
  background do
    FactoryGirl.create(
      :template,
       key:      "home.show",
       template: [
         [ :row, :children => [
             [ :column, :size => 1, children: ["partial"] ],
             [ :column, :size => 2 ]
           ]
         ] ].to_json
    )
  end

  scenario 'requesting show' do
    visit '/'

    within 'div.row' do
      within 'div.large-1.column' do
        page.should have_content "partial content"
      end
      within 'div.large-2.column' do
        page.should have_content
      end
    end
  end
end
