Sha256: da2613462e407f40cb22cc991799aff415439071f2c9124e70ee3ca060e2570d
Contents?: true
Size: 1 KB
Versions: 3
Compression:
Stored size: 1 KB
Contents
require 'test_puppet_helper' module ForemanPuppet module Api module V2 class ConfigGroupsControllerTest < ActionController::TestCase setup do @routes = ForemanPuppet::Engine.routes end test 'should create config group' do assert_difference('ConfigGroup.count') do post :create, params: { config_group: { name: 'config-group', puppetclass_ids: [puppetclasses(:one).id, puppetclasses(:four).id] } } end assert_response :created end test 'should update config group' do name = 'new name' put :update, params: { id: config_groups(:one).to_param, config_group: { name: name, puppetclass_ids: [puppetclasses(:one).id, puppetclasses(:four).id] } } assert_response :success response = JSON.parse(@response.body) assert_equal 2, response['puppetclasses'].count end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems