Sha256: 5aa134997c71f044bd8f554f7f544c67ad19aa9db7f4fbe3655c8ef275e58ee6

Contents?: true

Size: 684 Bytes

Versions: 9

Compression:

Stored size: 684 Bytes

Contents

require 'test_helper'

module PagesCms
  class Admin::ArticlesControllerTest < ActionController::TestCase

    setup do
      @routes = Engine.routes
    end

    test 'should get new' do
      get :new
      assert_response :success
    end

    test 'should get edit' do
      get :edit, id: pages_cms_articles(:one)
      assert_response :success
    end

    test 'should get index' do
      get :index
      assert_response :success
    end

    test 'article create' do
      article = { title: 'something', content: 'something', tags: 'something', draft: true }
      assert_difference 'Article.count', +1 do
        post :create, article: article
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pages_cms-1.1.0 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.8 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.6 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.5 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.4 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.3 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.2 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.1 test/functional/pages_cms/admin/articles_controller_test.rb
pages_cms-1.0.0 test/functional/pages_cms/admin/articles_controller_test.rb