Sha256: cd739eb69987d379114e1ccd1441870610a16d54a31a00fa083f8564062a43d0

Contents?: true

Size: 1.37 KB

Versions: 10

Compression:

Stored size: 1.37 KB

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")

describe Braintree::RiskData do
  describe "#initialize" do
    it "sets id, decision, device_data_captured, decision_reasons and transaction_risk_score" do
      risk_data = Braintree::RiskData.new(:id => "123", :decision => "YOU WON $1000 DOLLARS", :device_data_captured => true, :fraud_service_provider => "fraud_protection", :decision_reasons => ["reason"], :transaction_risk_score => "12")
      risk_data.id.should == "123"
      risk_data.decision.should == "YOU WON $1000 DOLLARS"
      risk_data.device_data_captured.should be_truthy
      risk_data.fraud_service_provider.should == "fraud_protection"
      risk_data.decision_reasons.should == ["reason"]
      risk_data.transaction_risk_score.should == "12"
    end
  end

  describe "inspect" do
    it "prints the attributes" do
      details = Braintree::RiskData.new(
        :id => "123",
        :decision => "YOU WON $1000 DOLLARS",
        :decision_reasons => ["reason"],
        :device_data_captured => true,
        :fraud_service_provider => "fraud_protection",
        :transaction_risk_score => "12",
      )
      details.inspect.should == %(#<RiskData id: "123", decision: "YOU WON $1000 DOLLARS", decision_reasons: ["reason"], device_data_captured: true, fraud_service_provider: "fraud_protection", transaction_risk_score: "12">)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
braintree-4.7.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.6.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.5.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.4.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.3.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.2.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.1.0 spec/unit/braintree/risk_data_spec.rb
braintree-4.0.0 spec/unit/braintree/risk_data_spec.rb
braintree-3.4.0 spec/unit/braintree/risk_data_spec.rb
braintree-3.3.0 spec/unit/braintree/risk_data_spec.rb