summaryrefslogtreecommitdiffstats
path: root/acceptance/tests/apply/hashes/should_not_reassign.rb
blob: 2b0f9cc13eee8ba493dc3d19b8569c6e4d7afbdd (plain)
1
2
3
4
5
6
7
8
9
10
test_name "hash reassignment should fail"
manifest = %q{
$my_hash = {'one' => '1', 'two' => '2' }
$my_hash['one']='1.5'
}

apply_manifest_on(agents, manifest, :acceptable_exit_codes => [1]) do
    fail_test "didn't find the failure" unless
        stderr.include? "Assigning to the hash 'my_hash' with an existing key 'one'"
end