Sha256: 51371646e5e875e27820871bfdcce3a2193575d27c1403b4d8ebe128c5238006

Contents?: true

Size: 838 Bytes

Versions: 2

Compression:

Stored size: 838 Bytes

Contents

require 'spec_helper'

describe Squall::Transaction do
  before(:each) do
    @transaction = Squall::Transaction.new
    @keys = ["pid", "created_at", "updated_at", "actor", "priority",
      "parent_type", "action", "id", "user_id", "dependent_transaction_id",
      "allowed_cancel", "parent_id", "params", "log_output", "status", "identifier"
    ]
  end

  describe "#list" do
    use_vcr_cassette 'transaction/list'

    it "lists transactions" do
      list = @transaction.list
      list.size.should be(3)

      first = list.first
      first.keys.should include(*@keys)
    end
  end

  describe "#show" do
    use_vcr_cassette "transaction/show"

    it "returns a transaction" do
      transaction = @transaction.show(1)
      transaction.keys.should include(*@keys)

      transaction['pid'].should == 2180
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
squall-1.4.0 spec/squall/transaction_spec.rb
squall-1.3.1 spec/squall/transaction_spec.rb