diff test/controllers/pastes_controller_test.rb @ 298:ff27821f9272

A test! Can you imagine that?!
author edogawaconan <me@myconan.net>
date Wed, 12 Feb 2014 15:10:42 +0900
parents
children 3c22d4acc2fa
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/controllers/pastes_controller_test.rb	Wed Feb 12 15:10:42 2014 +0900
@@ -0,0 +1,11 @@
+require "test_helper"
+
+class PastesControllerTest < ActionController::TestCase
+  test "filters spam" do
+    assert_no_difference("Paste.count") do
+      post :create, "url1" => "http://hello.com", "paste" => { "paste" => "here be paste", "key" => "12341234" }
+    end
+
+    assert_response :success
+  end
+end