require 'test_helper'

class ZoneTest < ActiveSupport::TestCase
	test "rotate shoule return a banner in the zone" do
		zone = zones(:public)
		banner = zone.rotate
		assert_equal true, banner.is_a?(Banner)
	end
	
	test "rotate should return default banner where set and no other banners" do
		zone = zones(:with_default)
		banner = zone.rotate
		assert_equal banner, zone.default_banner
	end
	
	test "rotate should return false with no banner and no default" do
		zone = zones(:without_default)
		banner = zone.rotate
		assert_equal false, banner
	end
end
