Project

General

Profile

« Previous | Next » 

Revision 9d43fc71

Added by Michael Moll almost 6 years ago

Fixes #19789 - fix Layout/SpaceAroundOperators cop

View differences:

test/controllers/api/v2/compute_attributes_controller_test.rb
class Api::V2::ComputeAttributesControllerTest < ActionController::TestCase
test "should create compute attribute" do
assert_difference('ComputeAttribute.count') do
valid_attrs = {:vm_attrs => {"cpus"=>"2", "memory"=>"2147483648"}}
valid_attrs = {:vm_attrs => {"cpus" => "2", "memory" => "2147483648"}}
post :create, params: { :compute_attribute => valid_attrs,
:compute_profile_id => compute_profiles(:three).id,
:compute_resource_id => compute_resources(:one).id }
......
end
test "should update compute attribute" do
valid_attrs = {:vm_attrs => {"cpus"=>"4"}}
valid_attrs = {:vm_attrs => {"cpus" => "4"}}
put :update, params: { :id => compute_attributes(:two).id,
:compute_profile_id => compute_profiles(:one).id,
:compute_resource_id =>compute_resources(:one).id,
:compute_resource_id => compute_resources(:one).id,
:compute_attribute => valid_attrs }
assert_response :success
assert_equal "4", compute_attributes(:two).reload.vm_attrs['cpus']

Also available in: Unified diff