OSDN Git Service

t#31281:add comic.description
[pettanr/pettanr.git] / spec / models / comic_spec.rb
index 64acd7e..f9978aa 100644 (file)
@@ -74,6 +74,15 @@ describe Comic do
         }.should raise_error(Pettanr::BadRequest)
       end
     end
+    
+    context 'descriptionを検証するとき' do
+      it 'Shift JISなら失敗する' do
+        @comic.description = "\x83G\x83r\x83]\x83D"
+        lambda{
+          @comic.valid_encode
+        }.should raise_error(Pettanr::BadRequest)
+      end
+    end
   end
   
   describe 'デフォルト値補充に於いて' do