Sha256: c19728843c7ffeb1d7a078741046cb73def062c7f1ce2e90be1171808b32aeb3
Contents?: true
Size: 743 Bytes
Versions: 3
Compression:
Stored size: 743 Bytes
Contents
require "spec_helper" describe BaseCrm::Forecasting do subject do BaseCrm::Forecasting.new({}) end describe "endpoint" do it "uses the production endpoint" do BaseCrm::Forecasting.scope.instance_eval do @endpoint.should == "https://sales.futuresimple.com" end end end describe ".fetch_for_deal" do let(:scope) { double } let(:deal) { double(:id => 444) } let(:result) { double } it "returns the scope" do BaseCrm::Forecasting.should_receive(:scope).and_return(scope) scope.should_receive(:get). with("/api/v1/deals/#{deal.id}/forecasting.json"). and_return(result) BaseCrm::Forecasting.fetch_for_deal(deal).should == result end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
basecrm-0.1.2 | spec/base_crm/forecasting_spec.rb |
basecrm-0.1.1 | spec/base_crm/forecasting_spec.rb |
basecrm-0.1.0 | spec/base_crm/forecasting_spec.rb |