Sha256: 9aea2734636c763ccd866b66d2586221f6a959684c877a6bde802558aaa7093d

Contents?: true

Size: 971 Bytes

Versions: 82

Compression:

Stored size: 971 Bytes

Contents

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

class Admin::Muck::FeedsControllerTest < ActionController::TestCase

  tests Admin::Muck::FeedsController

  context "admin feeds controller" do
    
    should_require_login :index => :get, :update => :put, :login_url => '/login'
    
    context "logged in as admin" do
      setup do
        @admin = Factory(:user)
        @admin_role = Factory(:role, :rolename => 'administrator')
        @admin.roles << @admin_role
        activate_authlogic
        login_as @admin
      end
      context "GET index" do
        setup do
          get :index
        end
        should_not_set_the_flash
        should_respond_with :success
        should_render_template :index
      end
      context "PUT update" do
        setup do
          @feed = Factory(:feed)
          put :update, :id => @feed, :status => true
        end
        should_redirect_to("feed index") { admin_feeds_path } 
      end
    end
  end

end

Version data entries

82 entries across 82 versions & 2 rubygems

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