Sha256: 20fa4ac55e1138e7cd64be0a8bbe537c27d79eb6c2e9af846d2d3056e1e2ef51
Contents?: true
Size: 778 Bytes
Versions: 9
Compression:
Stored size: 778 Bytes
Contents
require 'test_helper' module PushType class TaxonomiesControllerTest < ActionController::TestCase describe 'GET #index' do before { get :index } it { response.must_render_template 'index' } it { assigns[:taxonomies].size.must_equal 1 } it { assigns[:taxonomies].first.must_equal Category } end describe 'GET #show' do before do 3.times { @parent = FactoryGirl.create :taxonomy, type: 'Category' } @child = FactoryGirl.create :taxonomy, type: 'Category', parent: @parent get :show, id: 'category' end it { response.must_render_template 'show' } it { assigns[:terms].size.must_equal 3 } it { assigns[:terms].map { |h| h[:children] }.flatten.size.must_equal 1 } end end end
Version data entries
9 entries across 9 versions & 1 rubygems