Sha256: dc2c1c6ab5bb69dd2a16b1412e88aeeacf320c51c61616a14448db9b8312c380

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

require "test_helper"

class ImageTest < ActiveSupport::TestCase
  def setup
    super
    @image = Image.new(:name => "test")
  end

  test "should save image without resource" do
    assert @image.save
  end

  test "should save image with uploaded resource" do
    assert @image.update(:resource => fogged_resources(:resource_text_1))

  end

  test "should not save image with uploading resource" do
    resource = fogged_resources(:resource_text_1)
    resource.update!(:uploading => true)

    refute @image.update(:resource => resource)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fogged-0.0.4 test/dummy/test/models/image_test.rb
fogged-0.0.3 test/dummy/test/models/image_test.rb
fogged-0.0.2 test/dummy/test/models/image_test.rb