Sha256: f174e881e9be3657a34372a7f5022a63626b4c7d53099460a356e064e7d99a08
Contents?: true
Size: 785 Bytes
Versions: 3
Compression:
Stored size: 785 Bytes
Contents
require File.expand_path('../test_helper', File.dirname(__FILE__)) class CarouselTest < ActiveSupport::TestCase def test_fixtures_validity Carousel::Carousel.all.each do |carousel| assert carousel.valid?, carousel.errors.inspect end end def test_validations carousel = Carousel::Carousel.new assert carousel.invalid? assert_has_errors_on carousel, [:label, :identifier] end def test_creation assert_difference 'Carousel::Carousel.count' do carousel = Carousel::Carousel.create(:identifier => 'test') assert_equal 'Test', carousel.label end end def test_destruction assert_difference ['Carousel::Carousel.count', 'Carousel::Slide.count'], -1 do carousel_carousels(:default).destroy end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
comfy_carousel-0.0.3 | test/unit/carousel_test.rb |
comfy_carousel-0.0.2 | test/unit/carousel_test.rb |
comfy_carousel-0.0.1 | test/unit/carousel_test.rb |