Sha256: 53ba92d845c798673f8e2887315a0aa80eed6ff152f4926ab09912d298b0d387

Contents?: true

Size: 537 Bytes

Versions: 2

Compression:

Stored size: 537 Bytes

Contents

require 'spec_helper'

RSpec.describe HelpersController, type: :controller do
  describe "schema_path helper" do
    it "returns a path to schema endpoint" do
      get "show_schema_path", { "schema_name" => "posts/create" }
      expect(response.body).to eq "/schemas/posts/create"
    end
  end

  describe "schema_url helper" do
    it "returns a URL to schema endpoint" do
      get "show_schema_url", { "schema_name" => "posts/create" }
      expect(response.body).to eq "#{request.base_url}/schemas/posts/create"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
json_schema_rails-0.2.1 spec/integration/helpers_controller_spec.rb
json_schema_rails-0.2.0 spec/integration/helpers_controller_spec.rb