Sha256: 7d4134df3b6631d6fa686c41028219b9295b511257671939e1b7cc07e9f0a9c6
Contents?: true
Size: 1.12 KB
Versions: 14
Compression:
Stored size: 1.12 KB
Contents
# -*- encoding : utf-8 -*- require 'spec_helper' describe Rubykassa::Notification do before(:each) do Rubykassa.configure do |config| end end it "should return correct valid_result_signature?" do notification = Rubykassa::Notification.new(Hash["InvId", "12", "OutSum", "1200", "SignatureValue", "373641e09a9d203ffa8639074c8e9697"]) notification.valid_result_signature?.should == true end it "should return correct valid_success_signature?" do notification = Rubykassa::Notification.new(Hash["InvId", "12", "OutSum", "1200", "SignatureValue", "9f219cd519aa7bd3549065b613a13a52"]) notification.valid_success_signature?.should == true end it "should return correct success" do notification = Rubykassa::Notification.new(Hash["InvId", "12"]) notification.success.should == "OK12" end it "should raise error when wrong kind argument is passed to signature generator" do expect { notification = Rubykassa::Notification.new({}) notification.generate_signature_for(:bullshit) }.to raise_error(ArgumentError, "Available kinds are only :payment, :result or :success") end end
Version data entries
14 entries across 14 versions & 1 rubygems