Sha256: 6cea072436311291e7f785eb21c8359e995926325d58aa03c9cec085379add6e

Contents?: true

Size: 692 Bytes

Versions: 19

Compression:

Stored size: 692 Bytes

Contents

require 'spec_helper'

describe Highrise::Deal do
  subject { Highrise::Deal.new(:id => 1) }
    
  it { should be_a_kind_of Highrise::Subject }
  
  it ".add_note" do
    Highrise::Note.should_receive(:create).with({:body=>"body", :subject_id=>1, :subject_type=>'Deal'}).and_return(mock('note'))
    subject.add_note :body=>'body'
  end
  
  describe ".update_status" do
    it { expect { subject.update_status("invalid") }.to raise_error(ArgumentError) }
    
    %w[pending won lost].each do |status|
      it "updates status to #{status}" do
        subject.should_receive(:put).with(:status, :status => {:name => status})
        subject.update_status(status)
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
highrise-3.2.3 spec/highrise/deal_spec.rb
highrise-3.2.1 spec/highrise/deal_spec.rb
highrise-3.1.6 spec/highrise/deal_spec.rb
highrise-3.1.5 spec/highrise/deal_spec.rb
highrise-3.1.2 spec/highrise/deal_spec.rb
highrise-3.1.1 spec/highrise/deal_spec.rb
highrise-3.1.0 spec/highrise/deal_spec.rb
highrise-3.1.0.pre spec/highrise/deal_spec.rb
highrise-3.0.5 spec/highrise/deal_spec.rb
highrise-3.0.4 spec/highrise/deal_spec.rb
highrise-3.0.3 spec/highrise/deal_spec.rb
peterosullivan-highrise-3.0.7 spec/highrise/deal_spec.rb
peterosullivan-highrise-3.0.6 spec/highrise/deal_spec.rb
peterosullivan-highrise-3.0.5 spec/highrise/deal_spec.rb
peterosullivan-highrise-3.0.4 spec/highrise/deal_spec.rb
peterosullivan-highrise-3.0.3 spec/highrise/deal_spec.rb
peterosullivan-highrise-3.0.2 spec/highrise/deal_spec.rb
highrise-3.0.1 spec/highrise/deal_spec.rb
highrise-3.0.0 spec/highrise/deal_spec.rb