spec/message_status_spec.rb in cdyne-sms-notify-0.7.1 vs spec/message_status_spec.rb in cdyne-sms-notify-0.8.0
- old
+ new
@@ -6,7 +6,19 @@
end
it "should have attributes that describe a message status" do
SmsNotify::MessageStatus.new({:status_code=>'6'}).status_code.should == '6'
end
+
+ describe "fatal_error?" do
+ it "should return true when the status_code describes a message that will not be delivered" do
+ status = SmsNotify::MessageStatus.new({:status_code=>'3'})
+ status.fatal_error?.should be true
+ end
+
+ it "should return false when the status_code describes a message that will be delivered" do
+ status = SmsNotify::MessageStatus.new({:status_code=>'5'})
+ status.fatal_error?.should be false
+ end
+ end
end