test/landrush/server_test.rb in landrush-0.18.0 vs test/landrush/server_test.rb in landrush-0.19.0

- old
+ new

@@ -33,23 +33,37 @@ end it 'responds properly to configured machine entries' do Server.start - fake_host = 'boogers.vagrant.dev' + fake_host = 'boogers.vagrant.test' fake_ip = '99.98.97.96' Store.hosts.set(fake_host, fake_ip) query(fake_host).must_equal fake_ip query_ptr(fake_host).must_equal fake_ip+'.' end + it 'responds properly to configured cname entries' do + Server.start + + fake_host = 'boogers.vagrant.test' + fake_cname = 'snot.vagrant.test' + fake_ip = '99.98.97.96' + + Store.hosts.set(fake_host, fake_ip) + Store.hosts.set(fake_cname, fake_host) + + query(fake_cname).must_equal fake_host+'.' + + end + it 'also resolves wildcard subdomains to a given machine' do Server.start - fake_host = 'boogers.vagrant.dev' + fake_host = 'boogers.vagrant.test' fake_ip = '99.98.97.96' Store.hosts.set(fake_host, fake_ip) query("green.#{fake_host}").must_match(fake_ip)