Sha256: fa38ef145bf65a000df3312fa228d1b0c5cbe34ff5feb5ff7a37cbaba0211b70
Contents?: true
Size: 791 Bytes
Versions: 1
Compression:
Stored size: 791 Bytes
Contents
require File.expand_path('../test_helper', File.dirname(__FILE__)) class GalleryTest < ActiveSupport::TestCase def test_fixtures_validity Gallery::Gallery.all.each do |gallery| assert gallery.valid?, gallery.errors.full_messages.to_s end end def test_validations gallery = Gallery::Gallery.new assert gallery.invalid? assert_has_errors_on gallery, [:title, :slug] end def test_creation assert_difference 'Gallery::Gallery.count' do Gallery::Gallery.create!( :title => 'Test Gallery', :slug => 'test-gallery' ) end end def test_destoy gallery = gallery_galleries(:default) assert_difference ['Gallery::Gallery.count', 'Gallery::Photo.count'], -1 do gallery.destroy end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
comfy_gallery-0.1.0 | test/unit/gallery_test.rb |