require 'test_helper' module PagesCms class Admin::ArticlesControllerTest < ActionController::TestCase setup do @routes = Engine.routes session[:current_account] = pages_cms_accounts(:one).id 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