Skip to content

Commit

Permalink
Merge pull request #745 from Ivanov-Anton/add_missing_index_spec
Browse files Browse the repository at this point in the history
added missing features spec for Routing::RoutingPlanStaticRoute
  • Loading branch information
gigorok authored Jun 19, 2020
2 parents dbb6ee8 + 35ab633 commit 4d0aad6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/factories/routing/static_route.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

FactoryBot.define do
factory :static_route, class: Routing::RoutingPlanStaticRoute do
routing_plan { create :routing_plan, :with_static_routes }
vendor { FactoryBot.create :vendor }

trait :filled do
network_prefix { FactoryBot.create :network_prefix }
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

RSpec.describe 'Index Routing Plan Static Route', :js do
include_context :login_as_admin

it 'n+1 checks' do
static_routes = create_list :static_route, 2, :filled
visit static_routes_path
static_routes.each do |static_route|
expect(page).to have_css('.resource_id_link', text: static_route.id)
end
end
end

0 comments on commit 4d0aad6

Please sign in to comment.