-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from restarone/bootstrapApplicationInstallFlow
Bootstrap application install flow (customize root domain)
- Loading branch information
Showing
7 changed files
with
73 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
# This file should contain all the record creation needed to seed the database with its default values. | ||
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). | ||
# | ||
# Examples: | ||
# | ||
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) | ||
# Character.create(name: 'Luke', movie: movies.first) | ||
|
||
Apartment::Tenant.switch('public') do | ||
User.create!(email: '[email protected]', password: '123456', password_confirmation: '123456', global_admin: true, confirmed_at: Time.now) | ||
Subdomain.unsafe_bootstrap_www_subdomain | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,16 @@ | |
class ContentControllerTest < ActionDispatch::IntegrationTest | ||
setup do | ||
@user = users(:public) | ||
@restarone_subdomain = Subdomain.find_by(name: 'restarone').name | ||
Apartment::Tenant.switch @restarone_subdomain do | ||
@restarone_user = User.find_by(email: '[email protected]') | ||
end | ||
end | ||
|
||
test "should get index" do | ||
get root_url | ||
assert_response :success | ||
get root_url(subdomain: @user.subdomain) | ||
get root_url(subdomain: @restarone_user.subdomain) | ||
assert_response :success | ||
end | ||
end |