Sha256: a83f85f716867015189d8deef05fe327e10771c5335b66eb03237554b8f48d88

Contents?: true

Size: 686 Bytes

Versions: 5

Compression:

Stored size: 686 Bytes

Contents

require "spec_helper"

describe Tane::Commands::Claim do

  describe ".process" do

    before :each do
      @args = ["valid_email", "valid_ido_id"]
    end
    
    it "should notify the local app about an App.claimed event" do
      Time.should_receive(:now).at_least(1).and_return("valid_time")

      event = {
        'category' => 'app',
        'event'    => 'claimed',
        'data'     => {
          'time'   => Time.now,
          'ido_id' => @args.last,
          'email' => @args.first
        }
      }

      Tane::Commands::Claim.should_receive(:post).
        with(Tane::Commands::Claim.data_url, event)

      Tane::Commands::Claim.process(@args)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tane-0.0.5 spec/commands/claim_spec.rb
tane-0.0.4 spec/commands/claim_spec.rb
tane-0.0.3 spec/commands/claim_spec.rb
tane-0.0.2 spec/commands/claim_spec.rb
tane-0.0.1 spec/commands/claim_spec.rb