File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 11## [ Unreleased]
22
3+ ## [ 1.3.0] - 2021-10-10
4+
5+ - Integrate with Rails default testing toolchain (Minitest + Capybara)
6+ - Integrate with RSpec + Capybara
37
48## [ 1.2.0] - 2021-10-08
59
Original file line number Diff line number Diff line change @@ -237,6 +237,12 @@ MultiTenantSupport.under_tenant amazon do
237237end
238238```
239239
240+ ### Set current tenant global
241+
242+ ```ruby
243+ MultiTenantSupport::Current.tenant_account = account
244+ ```
245+
240246### Disallow read across tenant by default
241247
242248This gem disallow read across tenant by default. You can check current state through:
@@ -348,17 +354,19 @@ Above code will make sure the `MultiTenantSupport.current_tenant` won't accident
348354With above testing requre code
349355
350356```ruby
351- setup do
352- MultiTenantSupport::Current.tenant_account = account
353- end
354-
357+ # Integration test
355358test "a integration test" do
359+ host! "apple.example.com"
360+
356361 assert_no_changes "MultiTenantSupport.current_tenant" do
357362 get users_path
358363 end
359364end
360365
366+ # System test
361367test "a system test" do
368+ Capybara.app_host = "http://apple.example.com"
369+
362370 assert_no_changes "MultiTenantSupport.current_tenant" do
363371 visit users_path
364372 end
Original file line number Diff line number Diff line change 11module MultiTenantSupport
2- VERSION = '1.2 .0'
2+ VERSION = '1.3 .0'
33end
You can’t perform that action at this time.
0 commit comments