Skip to content

Commit

Permalink
[ci] Add routing specs for image templates feature switch
Browse files Browse the repository at this point in the history
  • 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.
21 changes: 21 additions & 0 deletions src/api/spec/routing/webui/projects/image_templates.rb
@@ -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

0 comments on commit b097602

Please sign in to comment.