Sha256: a80b3d5f48d3e7b5f95a76e8e84e09a93df656d0802fc084d3c2fa5a8350c828
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
ENV['RACK_ENV'] = 'test' require 'test_helper' require 'rack/test' require 'capybara' require 'capybara/dsl' require 'service_contract/avro/documentation' class DocumentationTest < Minitest::Test include Capybara::DSL class SampleDocumentation < ServiceContract::Avro::Documentation def service SampleService end end def setup super Capybara.app = SampleDocumentation end def test_homepage_html visit '/' assert page.find("a[href='http://www.example.com/1']", text: "Version 1") assert page.find("a[href='http://www.example.com/2']", text: "Version 2") end def test_version_index_html visit '/1' assert page.find("a[href='http://www.example.com/1/city_state']", text: "city_state") assert page.find("a[href='http://www.example.com/1/location']", text: "location") assert page.find("a[href='http://www.example.com/1/sales_region']", text: "sales_region") end def test_version_protocol_html visit '/1/city_state' assert page.has_content?("CityState params") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
service_contract-0.6.0 | test/documentation_test.rb |