spec/sms_spec.rb in mblox-0.2.6 vs spec/sms_spec.rb in mblox-0.2.7
- old
+ new
@@ -131,16 +131,22 @@
response.size.should eq(1)
response.first.unroutable?.should be_true, "#{response.first.inspect} should have been unroutable"
response.first.ok?.should be_false
end
- "\r\n!\"#\$\%&'\(\)*+,-.\/:;<=>?@_£¤¥§¿iÄÅÆÇÉÑÖØÜßáäåæèéìñòöøùü\tí¡ ".each_char do |i|
+ Mblox::Sms::LEGAL_CHARACTERS.each_char do |i|
it "allows the special char #{i}, correctly escaping illegal XML characters where necessary" do
response = Mblox::Sms.new(LANDLINE,"#{the_message}#{i}#{the_message}").send
response.size.should eq(1)
response.first.ok?.should be_false
response.first.unroutable?.should be_true
end
+ end
+
+ it "can send all the legal characters" do
+ response = Mblox::Sms.new(TEST_NUMBER,Mblox::Sms::LEGAL_CHARACTERS).send
+ response.size.should eq(1)
+ response.first.ok?.should be_true
end
end
describe "batch_id" do
it "can be specified" do