Sha256: b50cbfb58051453587e80f7089dc91c7f3ec1a53f9dd2f9fa0ab3dc98d1c7a05
Contents?: true
Size: 812 Bytes
Versions: 2
Compression:
Stored size: 812 Bytes
Contents
require 'test_plugin_helper' class Api::V2::ArfReportsControllerTest < ActionController::TestCase setup do # override validation of policy (puppetclass, lookup_key overrides) Scaptimony::Policy.any_instance.stubs(:valid?).returns(true) end test "should get index" do FactoryGirl.create(:arf_report) get :index, {}, set_session_user response = ActiveSupport::JSON.decode(@response.body) assert_not response['results'].empty? assert_response :success end test "should get show" do get :show, { :id => FactoryGirl.create(:arf_report).to_param }, set_session_user response = ActiveSupport::JSON.decode(@response.body) refute response['passed'].blank? refute response['failed'].blank? refute response['othered'].blank? assert_response :success end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_openscap-0.4.1 | test/functional/api/v2/arf_reports_controller_test.rb |
foreman_openscap-0.4.0 | test/functional/api/v2/arf_reports_controller_test.rb |