Sha256: 8fbc1cebdd248b9e87bd52e335ba43e61bdd68dd8e63b22a80c4fbb64dbbf9e0
Contents?: true
Size: 913 Bytes
Versions: 5
Compression:
Stored size: 913 Bytes
Contents
require 'pact_broker/domain' require 'pact_broker/policies' require 'pact_broker/ui/app' RSpec.describe "regression tests for index page" do context "HTML" do let(:app) { PactBroker::UI::App.new } it "has the same response without tags" do response = get("/", nil, { "HTTP_ACCEPT" => "text/html" } ) Approvals.verify(response.body, :name => "index_html", format: :html) end it "has the same response with tags" do response = get("/", { "tags" => "true", "pageNumber" => "1", "pageSize" => "100"}, { "HTTP_ACCEPT" => "text/html" } ) Approvals.verify(response.body, :name => "index_html_with_tags", format: :html) end end context "JSON" do it "has the same response" do response = get("/dashboard", { "HTTP_ACCEPT" => "application/hal+json" } ) Approvals.verify(JSON.parse(response.body), :name => "index_json", format: :json) end end end
Version data entries
5 entries across 5 versions & 1 rubygems