Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Add routing specs for image templates feature switch
- Loading branch information
Moises Deniz Aleman
committed
Jan 26, 2017
1 parent
10ea796
commit b097602
Showing
1 changed file
with
21 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe 'Image templates' do | ||
context 'feature switch' do | ||
it 'enabled' do | ||
Feature.run_with_activated(:image_templates) do | ||
# We need to forced reload routes because conditional routes definition based on the feature switch | ||
Rails.application.reloader.reload! | ||
expect(get: :image_templates).to be_routable | ||
end | ||
end | ||
|
||
it 'disabled' do | ||
Feature.run_with_deactivated(:image_templates) do | ||
# We need to forced reload routes because conditional routes definition based on the feature switch | ||
Rails.application.reloader.reload! | ||
expect(get: :image_templates).not_to be_routable | ||
end | ||
end | ||
end | ||
end |