spec/unit/webmoney_spec.rb in webmoney-0.0.10 vs spec/unit/webmoney_spec.rb in webmoney-0.0.11

- old
+ new

@@ -13,11 +13,11 @@ it "should return reqn" do t1 = @wm.send(:reqn) sleep(0.1) t2 = @wm.send(:reqn) - t1.should match(/^\d{16}$/) + t1.should match(/^\d{14}$/) (t2 > t1).should be_true end it "should correct prepare interfaces urls" do wm = TestWM.new :wmid => WmConfig.first['wmid'], :key => nil @@ -29,16 +29,16 @@ wm.interfaces[:get_passport].to_s.should == 'https://passport.webmoney.ru/asp/XMLGetWMPassport.asp' end it "should correct reqn" do Time.stub!(:now).and_return(Time.at(1244704683.69677)) - @wm.send(:reqn).should == '2009061111180369' + @wm.send(:reqn).should == '09061111180369' end it "should correct reqn with zero microsec" do Time.stub!(:now).and_return(Time.at(1244704683)) - @wm.send(:reqn).should == '2009061111180300' + @wm.send(:reqn).should == '09061111180300' end it "should raise error on incorrect arg" do lambda { @wm.send(:request, :check_sign, 1) }. should raise_error(ArgumentError) @@ -162,11 +162,11 @@ @invoice = @ca.request(:create_invoice, :orderid => 1, :amount => 1, :customerwmid => @wm.wmid, :storepurse => WmConfig.second['wmz'], - :desc => "Test invoice", - :address => "Address" + :desc => "Invoice текст", + :address => "Address адрес" ) end it "should be created" do @invoice[:retval].should == 0