Sha256: 1e0af5dd7d5d183fb98a799e678d2cb4a7101fb8c21eebc10c2586365bd0ff14

Contents?: true

Size: 518 Bytes

Versions: 14

Compression:

Stored size: 518 Bytes

Contents

require 'spec_helper'
require 'apartment/elevators/first_subdomain'

describe Apartment::Elevators::FirstSubdomain do
  describe "subdomain" do
    subject { described_class.new("test").parse_tenant_name(request) }
    let(:request) { double(:request, :host => "#{subdomain}.example.com") }

    context "one subdomain" do
      let(:subdomain) { "test" }
      it { should == "test" }
    end

    context "nested subdomains" do
      let(:subdomain) { "test1.test2" }
      it { should == "test1" }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
apartment-1.0.2 spec/unit/elevators/first_subdomain_spec.rb
apartment-1.0.1 spec/unit/elevators/first_subdomain_spec.rb
apartment-1.0.0 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.26.1 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.26.0 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.25.2 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.25.1 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.25.0 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.24.3 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.24.2 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.24.1 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.24.0 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.23.2 spec/unit/elevators/first_subdomain_spec.rb
apartment-0.23.1 spec/unit/elevators/first_subdomain_spec.rb