Sha256: 757a6f61b793428faa022dafcb973f7e2e9e5c084cfd2c1dde17decce644a1d0

Contents?: true

Size: 606 Bytes

Versions: 23

Compression:

Stored size: 606 Bytes

Contents

require 'spec_helper'

describe Dragonfly::Job::Fetch do

  let (:app) { test_app }
  let (:job) { Dragonfly::Job.new(app) }

  before(:each) do
    job.fetch!('some_uid')
  end

  it { job.steps.should match_steps([Dragonfly::Job::Fetch]) }

  it "should read from the app's datastore when applied" do
    app.datastore.should_receive(:read).with('some_uid').and_return ["", {}]
    job.apply
  end

  it "raises NotFound if the datastore returns nil" do
    app.datastore.should_receive(:read).and_return(nil)
    expect {
      job.apply
    }.to raise_error(Dragonfly::Job::Fetch::NotFound)
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
dragonfly-1.4.1 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.4.0 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.3.0 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.2.1 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.2.0 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.1.5 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.1.4 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.1.3 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.1.2 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.1.1 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.1.0 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.12 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.11 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.10 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.9 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.8 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.7 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.6 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.5 spec/dragonfly/job/fetch_spec.rb
dragonfly-1.0.4 spec/dragonfly/job/fetch_spec.rb