spec/unit/webmoney_spec.rb in webmoney-0.0.4.3 vs spec/unit/webmoney_spec.rb in webmoney-0.0.4.4
- old
+ new
@@ -42,13 +42,13 @@
@wm.error.should == '404'
@wm.errormsg.should match(/^<!DOCTYPE HTML PUBLIC/)
end
it "should parse retval and raise error" do
- lambda { @wm.request(:create_transaction)}.should raise_error(ResultError)
- @wm.error.should == -3
- @wm.errormsg.should match(%r{incorrect value of w3s.request/trans/tranid is incorrect})
+ lambda { @wm.request(:send_message, :wmid => '')}.should raise_error(ResultError)
+ @wm.error.should == -2
+ @wm.errormsg.should match(%r{value of w3s.request/message/receiverwmid is incorrect})
end
it "should sign string" do
@wm.send(:sign, 'Test123').should match(/^[0-9a-f]{132}$/)
end
@@ -104,8 +104,12 @@
result.should be_kind_of(Hash)
result[:id].should match(/^\d*$/)
((result[:date] + 60) > Time.now).should be_true
end
+ it "should raise error on undefined xml func" do
+ lambda { @wm.request(:unexistent_interface) }.should raise_error(::NotImplementedError)
+ end
+
end
end
\ No newline at end of file