test_spec.rb 548 B

123456789101112131415161718
  1. require 'serverspec'
  2. require 'yaml'
  3. # Required by serverspec
  4. set :backend, :exec
  5. describe "Database match for extra teams" do
  6. it "extra variables" do
  7. expected_hash = [{ "bla"=> "xxxx", "name"=> "daniels", "state"=> "present" },{ "extra_xxxx"=> "xxx", "name"=> "gin", "state"=> "present" }, { "name"=> "ops", "openvpn"=> true, "state"=> "present"}, {"name"=> "label", "openvpn"=> true, "state"=> "present"}]
  8. given_hash = YAML.load_file('/tmp/extra_advanced_team_db.yaml')
  9. expect(given_hash).to match(expected_hash)
  10. end
  11. end