Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from solidusio:main #405

Merged
merged 13 commits into from
Apr 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move promo controllers and routes to legacy_promotions
  • Loading branch information
mamhoff committed Apr 18, 2024
commit 16110fb8214b1e9cea87af78e29310c1a008307d
8 changes: 8 additions & 0 deletions legacy_promotions/config/routes.rb
Original file line number Diff line number Diff line change
@@ -14,3 +14,11 @@
resources :promotion_categories, except: [:show]
end
end

SolidusAdmin::Engine.routes.draw do
require "solidus_admin/admin_resources"
extend SolidusAdmin::AdminResources

admin_resources :promotions, only: [:index, :destroy]
admin_resources :promotion_categories, only: [:index, :destroy]
end
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

require 'rails_helper'

RSpec.describe "Promotion Categories", :js, type: :feature do
RSpec.describe "Promotion Categories", :js, type: :feature, solidus_admin: true do
before { sign_in create(:admin_user, email: 'admin@example.com') }

it "lists promotion categories and allows deleting them" do
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

require 'rails_helper'

RSpec.describe "Promotions", :js, type: :feature do
RSpec.describe "Promotions", :js, type: :feature, solidus_admin: true do
before { sign_in create(:admin_user, email: 'admin@example.com') }

it "lists promotions and allows deleting them" do
4 changes: 0 additions & 4 deletions legacy_promotions/spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -95,10 +95,6 @@
Rails.cache.clear
end

config.define_derived_metadata(file_path: %r{spec/features/solidus_admin}) do |metadata|
metadata[:solidus_admin] = true
end

config.around :each, :solidus_admin do |example|
DummyApp.use_solidus_admin = true
example.run