Sha256: 8f01050f339b5bcaec259c4277f6d99a284f0d8c1780016138a2d25c258164c3

Contents?: true

Size: 1.15 KB

Versions: 25

Compression:

Stored size: 1.15 KB

Contents

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

class Muck::OaiEndpointsControllerTest < ActionController::TestCase

  tests Muck::OaiEndpointsController

  context "oai endpoints controller" do
    
    context "logged in as admin" do
      setup do
        @user = Factory(:user)
        activate_authlogic
        login_as @user
      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 "POST create" do
        setup do
          post :create, :oai_endpoint => { :uri => 'http://www.example.com', :title => 'example' }
        end
        should_set_the_flash_to(I18n.t('muck.raker.oai_endpoint_successfully_created'))
        should_redirect_to("show oai endpoint") { oai_endpoint_url(assigns(:oai_endpoint)) }
      end
      context "GET show" do
        setup do
          @oai_endpoint = Factory(:oai_endpoint)
          get :show, :id => @oai_endpoint.to_param
        end
        should_not_set_the_flash
        should_respond_with :success
        should_render_template :show
      end
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
muck-raker-0.2.11 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.10 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.9 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.8 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.7 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.6 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.5 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.4 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.3 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.2 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.2.0 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.49 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.48 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.47 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.46 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.45 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.43 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.42 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.41 test/rails_root/test/functional/oai_endpoints_controller_test.rb
muck-raker-0.1.40 test/rails_root/test/functional/oai_endpoints_controller_test.rb