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