require_relative 'spec_helper'

describe 'Noodle' do
  it "should fail to create a node with the same name as an existing node" do
    post '/nodes/pigglywiggly.example.com', '{"params":{"ilk":"host","status":"surplus","site":"moon","project":"pigglywiggly","prodlevel":"dev"}}'
    assert_equal last_response.status, 400
    assert last_response.body.must_include 'project is not one of these: hr,financials,lms,registration,warehouse.  It is pigglywiggly.'
  end
end


Add test for creating a project that isn't allowed
Add test for creating a project that isn't allowed
