Sha256: a949a0a493eb267bb0da4c4313df86dceda36614ffafca662be778873d98ad8e

Contents?: true

Size: 1.1 KB

Versions: 36

Compression:

Stored size: 1.1 KB

Contents

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

class Muck::TopicsControllerTest < ActionController::TestCase

  tests Muck::TopicsController

  context "topics controller" do

    setup do
      bootstrap_services
    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 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

36 entries across 36 versions & 1 rubygems

Version Path
muck-services-0.1.47 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.46 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.45 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.44 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.43 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.42 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.41 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.40 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.39 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.38 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.37 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.36 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.35 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.34 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.33 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.32 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.31 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.30 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.29 test/rails_root/test/functional/topics_controller_test.rb
muck-services-0.1.28 test/rails_root/test/functional/topics_controller_test.rb