changeset 298:ff27821f9272

A test! Can you imagine that?!
author edogawaconan <me@myconan.net>
date Wed, 12 Feb 2014 15:10:42 +0900
parents dff632a63ada
children d6e94d7d0325
files test/controllers/pastes_controller_test.rb
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
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