GeoRSS aggregator and Layar augmented reality server
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

50 рядки
1.1 KiB

  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