GeoRSS aggregator and Layar augmented reality server
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

feeds_controller_test.rb 1.1 KiB

il y a 12 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. require 'test_helper'
  2. class FeedsControllerTest < ActionController::TestCase
  3. setup do
  4. @feed = feeds(:one)
  5. end
  6. test "should get index" do
  7. get :index
  8. assert_response :success
  9. assert_not_nil assigns(:feeds)
  10. end
  11. test "should get new" do
  12. get :new
  13. assert_response :success
  14. end
  15. test "should create feed" do
  16. assert_difference('Feed.count') do
  17. post :create, feed: { last_fetched: @feed.last_fetched, link: @feed.link, title: @feed.title }
  18. end
  19. assert_redirected_to feed_path(assigns(:feed))
  20. end
  21. test "should show feed" do
  22. get :show, id: @feed
  23. assert_response :success
  24. end
  25. test "should get edit" do
  26. get :edit, id: @feed
  27. assert_response :success
  28. end
  29. test "should update feed" do
  30. put :update, id: @feed, feed: { last_fetched: @feed.last_fetched, link: @feed.link, title: @feed.title }
  31. assert_redirected_to feed_path(assigns(:feed))
  32. end
  33. test "should destroy feed" do
  34. assert_difference('Feed.count', -1) do
  35. delete :destroy, id: @feed
  36. end
  37. assert_redirected_to feeds_path
  38. end
  39. end