Sha256: 0c3a902df69402076474bd0a90cbf248110b0f3c8f9254ec2b04a048b39daf63

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

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

class Muck::TopicsControllerTest < ActionController::TestCase

  tests Muck::TopicsController

  context "topics controller" do

    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 rss_discovery with term defined" do
      setup do
        get :rss_discovery, :id => 'ruby,rails'
      end
      should_not_set_the_flash
      should_respond_with :success
      should_render_template :rss_discovery
    end
    
    context "GET show with term defined" do
      setup do
        get :show, :id => 'ruby,rails'
      end
      should_not_set_the_flash
      should_respond_with :success
      should_render_template :show
    end
  
    context "GET show without terms" do
      setup do
        get :show, :id => ' '
      end
      should_set_the_flash_to(I18n.t('muck.services.no_terms_error'))
      should_redirect_to("new topic") { new_topic_path }
    end
    
  end
  
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
muck-services-0.1.10 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.9 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.8 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.7 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.6 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.5 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.4 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.3 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.2 test/rails_root/test/functional/topics_controller_test.rb