Sha256: 19ab72b79859ea4cb6c48a8f9786a1dcd5020fb95f70eb4ece40cc914f6b2979

Contents?: true

Size: 654 Bytes

Versions: 12

Compression:

Stored size: 654 Bytes

Contents

require "test_helper"

class MovieTest < ActiveSupport::TestCase
  def setup
    @movie = Movie.new(:name => "test")
  end

  test "should save movie with no resources" do
    assert @movie.save
  end

  test "should save movie with several resources" do
    @movie.resources = fogged_resources(:resource_text_1, :resource_text_2)

    assert @movie.save
  end

  test "should not save movie with uploading resource" do
    @movie.resources = fogged_resources(:resource_text_1, :resource_text_2)
    resource = fogged_resources(:resource_text_4)
    resource.update!(:uploading => true)
    @movie.resources << resource

    refute @movie.save
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fogged-0.0.13 test/dummy/test/models/movie_test.rb
fogged-0.0.12 test/dummy/test/models/movie_test.rb
fogged-0.0.11 test/dummy/test/models/movie_test.rb
fogged-0.0.10 test/dummy/test/models/movie_test.rb
fogged-0.0.9 test/dummy/test/models/movie_test.rb
fogged-0.0.8 test/dummy/test/models/movie_test.rb
fogged-0.0.7 test/dummy/test/models/movie_test.rb
fogged-0.0.6 test/dummy/test/models/movie_test.rb
fogged-0.0.5 test/dummy/test/models/movie_test.rb
fogged-0.0.4 test/dummy/test/models/movie_test.rb
fogged-0.0.3 test/dummy/test/models/movie_test.rb
fogged-0.0.2 test/dummy/test/models/movie_test.rb