Sha256: d769ba7e9eb434d7d543919f7dca867acf1eafe65ef43b5b200a52c9c275ba8d

Contents?: true

Size: 843 Bytes

Versions: 11

Compression:

Stored size: 843 Bytes

Contents

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

describe TopicsController do
  dataset :forums

  before do
    Page.current_site = sites(:test) if defined? Site
    controller.stub!(:request).and_return(request)
    Radiant::Config['forum.public?'] = true
  end

  describe "on get to index" do
    describe "with html format" do
      before do
        get :index
      end
    
      it "should render the topic list" do
        response.should be_success
        response.should render_template("index")
      end
    end
  end
    
  describe "on get to show" do
    before do
      @topic = topics(:older)
      get :show, :id => topic_id(:older), :forum_id => forum_id(:public)
    end
    
    it "should render the show template" do
      response.should be_success
      response.should render_template("show")
    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
radiant-forum-extension-3.0.7 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.6 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.5 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.4 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.3 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.2 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.1 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.0 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.0.rc6 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.0.rc4 spec/controllers/topics_controller_spec.rb
radiant-forum-extension-3.0.0.rc3 spec/controllers/topics_controller_spec.rb