Skip to content

Commit c1f6435

Browse files
committed
Add missing specs for other sortables
1 parent ed8d573 commit c1f6435

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

admin/spec/features/payment_methods_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'spec_helper'
4+
require "solidus_admin/testing_support/shared_examples/moveable"
45

56
describe "Payment Methods", :js, type: :feature do
67
before { sign_in create(:admin_user, email: '[email protected]') }
@@ -45,4 +46,10 @@
4546
expect(page).not_to have_content("Check")
4647
expect(Spree::PaymentMethod.count).to eq(3)
4748
end
49+
50+
it_behaves_like "features: sortable" do
51+
let(:factory) { :payment_method }
52+
let(:displayed_attribute) { :name }
53+
let(:path) { solidus_admin.payment_methods_path }
54+
end
4855
end

admin/spec/features/taxonomies_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'spec_helper'
4+
require "solidus_admin/testing_support/shared_examples/moveable"
45

56
describe "Taxonomies", :js, type: :feature do
67
before { sign_in create(:admin_user, email: '[email protected]') }
@@ -21,4 +22,10 @@
2122
expect(page).not_to have_content("Categories")
2223
expect(Spree::Taxonomy.count).to eq(1)
2324
end
25+
26+
it_behaves_like "features: sortable" do
27+
let(:factory) { :taxonomy }
28+
let(:displayed_attribute) { :name }
29+
let(:path) { solidus_admin.taxonomies_path }
30+
end
2431
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
require "spec_helper"
4+
require "solidus_admin/testing_support/shared_examples/moveable"
5+
6+
RSpec.describe "SolidusAdmin::PaymentMethodsController", type: :request do
7+
it_behaves_like "requests: moveable" do
8+
let(:factory) { :payment_method }
9+
let(:request_path) { solidus_admin.move_payment_method_path(record, format: :js) }
10+
end
11+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
require "spec_helper"
4+
require "solidus_admin/testing_support/shared_examples/moveable"
5+
6+
RSpec.describe "SolidusAdmin::TaxonomiesController", type: :request do
7+
it_behaves_like "requests: moveable" do
8+
let(:factory) { :taxonomy }
9+
end
10+
end

0 commit comments

Comments
 (0)