Sha256: 93fca262070a492a69580f9c465e2f05c59fba520aa9cb8bade53f6e5327ccb3

Contents?: true

Size: 1.65 KB

Versions: 11

Compression:

Stored size: 1.65 KB

Contents

require File.dirname(__FILE__) + '/../test_helper'

class Muck::FeedsControllerTest < ActionController::TestCase

  tests Muck::FeedsController

  context "feeds controller" do
    
    context "GET index" do
      setup do
        get :index
      end
      should_not_set_the_flash
      should_respond_with :success
      should_render_template :index
    end

    context "GET show" do
      setup do
        @feed = Factory(:feed)
        get :show, :id => @feed.to_param, :format => 'html'
      end
      should_not_set_the_flash
      should_respond_with :success
      should_render_template :show
    end

    context "GET new" do
      setup do
        get :new
      end
      should_not_set_the_flash
      should_respond_with :success
      should_render_template :new
    end
    
    context "GET new_extended" do
      setup do
        get :new_extended
      end
      should_not_set_the_flash
      should_respond_with :success
      should_render_template :new_extended
    end

    context "POST create (simple)" do
      setup do
        post :create, :feed => { :uri => TEST_RSS_URI }
      end
      should_set_the_flash_to(I18n.t('muck.raker.feed_successfully_created'))
    end
        
    context "POST create (advanced)" do
      setup do
        post :create, :feed => { :uri => TEST_RSS_URI, 
                                 :display_uri => 'http://www.example.com',
                                 :title => 'test feed long',
                                 :short_title => 'test feed',
                                 :description => 'foo bar'  }
      end
      should_set_the_flash_to(I18n.t('muck.raker.feed_successfully_created'))
    end

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
muck-raker-0.1.22 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.23 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.24 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.25 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.26 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.16 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.17 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.18 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.19 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.20 test/rails_root/test/functional/feeds_controller_test.rb
muck-raker-0.1.21 test/rails_root/test/functional/feeds_controller_test.rb