Sha256: 5049f33e1e53450a6dbeccd17b6a7e60662dda341484a5eddc8d6e1053d671c2

Contents?: true

Size: 964 Bytes

Versions: 34

Compression:

Stored size: 964 Bytes

Contents

require 'test_helper'

module PushType
  class NodesHelperTest < ActionView::TestCase

    describe '#nodes_array' do
      let(:nodes)  { 4.times.map { FactoryGirl.create :node } }
      subject { nodes_array(nodes) }
      it { subject.must_be_instance_of Array }
      it { subject.first.must_be_instance_of Hash }
      it { subject.size.must_equal 4 }
    end

    describe '#node_hash' do
      let(:node) { FactoryGirl.create :node }
      subject { node_hash(node) }
      it { subject.must_be_instance_of Hash }
      it { subject.key?(:type).must_equal true }
      it { subject.key?(:title).must_equal true }
      it { subject.key?(:slug).must_equal true }
      it { subject.key?(:status).must_equal true }
      it { subject.key?(:published_at).must_equal true }
      it { subject.key?(:published_to).must_equal true }
      it { subject.key?(:new_record?).must_equal true }
      it { subject.key?(:published?).must_equal true }
    end

  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
push_type_admin-0.11.2 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.11.1 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.11.0.beta.2 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.11.0.beta.1 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.4 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.3 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.2 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.1 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.0 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.0.beta.5 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.10.0.beta.3 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.5 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.3 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.2 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.1 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.0 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.0.beta.4 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.0.beta.3 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.9.0.beta.2 test/helpers/push_type/nodes_helper_test.rb
push_type_admin-0.8.2 test/helpers/push_type/nodes_helper_test.rb