solidus_backend 2.6.6 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_backend might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/app/assets/javascripts/spree/backend.js +1 -1
- data/app/assets/javascripts/spree/backend/{stock_location.js → addresses.js} +1 -1
- data/app/assets/javascripts/spree/backend/templates/taxons/_tree.hbs +2 -0
- data/app/assets/stylesheets/spree/backend/globals/_functions.scss +1 -2
- data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +2 -4
- data/app/controllers/spree/admin/orders_controller.rb +1 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +2 -1
- data/app/controllers/spree/admin/reports_controller.rb +5 -1
- data/app/controllers/spree/admin/return_authorizations_controller.rb +11 -2
- data/app/controllers/spree/admin/users_controller.rb +5 -5
- data/app/views/spree/admin/orders/_carton.html.erb +6 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/promotions/_activations_new.html.erb +0 -12
- data/app/views/spree/admin/promotions/_form.html.erb +1 -10
- data/app/views/spree/admin/reports/index.html.erb +2 -2
- data/app/views/spree/admin/shared/_navigation_footer.html.erb +10 -3
- data/app/views/spree/admin/shared/_order_submenu.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/_form.html.erb +1 -1
- data/app/views/spree/admin/users/_addresses_form.html.erb +3 -3
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +24 -3
- data/spec/controllers/spree/admin/reports_controller_spec.rb +2 -10
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +49 -0
- data/spec/features/admin/promotion_adjustments_spec.rb +0 -14
- data/spec/views/spree/admin/shared/navigation_footer_spec.rb +28 -3
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 766f093633c7ee34052a03fc7868087e727abc2f
|
4
|
+
data.tar.gz: c3126331f8662dae7b5f6b4bfe044607627286c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '058e7d17f55becb37f3c0209cbe7ce3a1acca7448d22b21babbdc3008d1a24d7f53686056da7fc3abc07846cae1f6fbd9c16b36e4cde644cfd39a5928981bd59'
|
7
|
+
data.tar.gz: 0eb8578b917cdf6278fe214cfb313fc3ba4d8d0b1bec0e50214374bd11f7554c00e7fa551ad2a44c287e6e067f01f000dd4c4dce472a0a5454f942f2a4683210
|
@@ -22,6 +22,7 @@
|
|
22
22
|
//= require spree/backend/collections
|
23
23
|
//= require spree/backend/views
|
24
24
|
//
|
25
|
+
//= require spree/backend/addresses
|
25
26
|
//= require spree/backend/adjustments
|
26
27
|
//= require spree/backend/admin
|
27
28
|
//= require spree/backend/calculator
|
@@ -52,7 +53,6 @@
|
|
52
53
|
//= require spree/backend/routes
|
53
54
|
//= require spree/backend/shipments
|
54
55
|
//= require spree/backend/spree-select2
|
55
|
-
//= require spree/backend/stock_location
|
56
56
|
//= require spree/backend/stock_management
|
57
57
|
//= require spree/backend/store_credits
|
58
58
|
//= require spree/backend/style_guide
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Spree.ready(function() {
|
4
4
|
"use strict";
|
5
5
|
|
6
|
-
_.each(document.querySelectorAll('.js-
|
6
|
+
_.each(document.querySelectorAll('.js-addresses-form'), function(el) {
|
7
7
|
var countrySelect = el.querySelector('.js-country_id');
|
8
8
|
var model = new Backbone.Model({
|
9
9
|
country_id: countrySelect.value
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Make color very close to white
|
2
|
-
@function very-light($color, $adjust: 3){
|
2
|
+
@function very-light($color, $adjust: 3){
|
3
3
|
@if type-of($adjust) == 'number' and $adjust > 0 {
|
4
4
|
@for $i from 0 through 100 {
|
5
5
|
@if lighten($color, $i) == white and ($i - $adjust) > $adjust {
|
@@ -10,7 +10,6 @@
|
|
10
10
|
@else {
|
11
11
|
@debug "Please correct $adjust value. It should be number and larger then 0. Currently it is '#{type-of($adjust)}' with value '#{$adjust}'"
|
12
12
|
}
|
13
|
-
@return $color;
|
14
13
|
};
|
15
14
|
|
16
15
|
// Quick fix for dynamic variables missing in SASS
|
@@ -11,15 +11,13 @@
|
|
11
11
|
margin-bottom: 1.5em;
|
12
12
|
}
|
13
13
|
|
14
|
-
.taxon {
|
15
|
-
border-radius: $border-radius;
|
16
|
-
}
|
17
|
-
|
18
14
|
.taxon {
|
19
15
|
background-color: very-light($color-3);
|
20
16
|
border: 1px solid $color-border;
|
17
|
+
border-radius: $border-radius;
|
21
18
|
color: $body-color;
|
22
19
|
font-weight: $font-weight-bold;
|
20
|
+
margin: 5px 0;
|
23
21
|
padding: 0.5em;
|
24
22
|
|
25
23
|
&.sortable {
|
@@ -140,7 +140,7 @@ module Spree
|
|
140
140
|
end
|
141
141
|
|
142
142
|
def resend
|
143
|
-
|
143
|
+
Spree::Config.order_mailer_class.confirm_email(@order, true).deliver_later
|
144
144
|
flash[:success] = t('spree.order_email_resent')
|
145
145
|
|
146
146
|
redirect_to(spree.edit_admin_order_path(@order))
|
@@ -67,10 +67,11 @@ module Spree
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def validate_payment_method_type
|
70
|
-
requested_type = params[:payment_method]
|
70
|
+
requested_type = params[:payment_method][:type]
|
71
71
|
@payment_method_type = @payment_method_types.detect do |klass|
|
72
72
|
klass.name == requested_type
|
73
73
|
end
|
74
|
+
|
74
75
|
if !@payment_method_type
|
75
76
|
flash[:error] = t('spree.invalid_payment_method_type')
|
76
77
|
redirect_to new_admin_payment_method_path
|
@@ -14,7 +14,11 @@ module Spree
|
|
14
14
|
if report_description_key.nil?
|
15
15
|
report_description_key = "#{report_key}_description"
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
|
+
@@available_reports[report_key] = {
|
19
|
+
name: report_key,
|
20
|
+
description: report_description_key,
|
21
|
+
}
|
18
22
|
end
|
19
23
|
end
|
20
24
|
|
@@ -10,9 +10,18 @@ module Spree
|
|
10
10
|
update.fails :load_form_data
|
11
11
|
|
12
12
|
def fire
|
13
|
-
|
13
|
+
action_from_params = "#{params[:e]}!"
|
14
|
+
|
15
|
+
if @return_authorization.state_events.include?(params[:e].to_sym) &&
|
16
|
+
@return_authorization.send(action_from_params)
|
17
|
+
|
18
|
+
flash_message = { success: t('spree.return_authorization_updated') }
|
19
|
+
else
|
20
|
+
flash_message = { error: t('spree.return_authorization_fire_error') }
|
21
|
+
end
|
22
|
+
|
14
23
|
redirect_back(fallback_location: admin_order_return_authorizations_path(@order),
|
15
|
-
|
24
|
+
flash: flash_message)
|
16
25
|
end
|
17
26
|
|
18
27
|
private
|
@@ -103,11 +103,11 @@ module Spree
|
|
103
103
|
return @collection if @collection
|
104
104
|
if request.xhr? && params[:q].present?
|
105
105
|
@collection = Spree.user_class.includes(:bill_address, :ship_address)
|
106
|
-
.where("
|
107
|
-
OR (spree_addresses.firstname #{LIKE} :search AND spree_addresses.id =
|
108
|
-
OR (spree_addresses.lastname #{LIKE} :search AND spree_addresses.id =
|
109
|
-
OR (spree_addresses.firstname #{LIKE} :search AND spree_addresses.id =
|
110
|
-
OR (spree_addresses.lastname #{LIKE} :search AND spree_addresses.id =
|
106
|
+
.where("#{Spree.user_class.table_name}.email #{LIKE} :search
|
107
|
+
OR (spree_addresses.firstname #{LIKE} :search AND spree_addresses.id = #{Spree.user_class.table_name}.bill_address_id)
|
108
|
+
OR (spree_addresses.lastname #{LIKE} :search AND spree_addresses.id = #{Spree.user_class.table_name}.bill_address_id)
|
109
|
+
OR (spree_addresses.firstname #{LIKE} :search AND spree_addresses.id = #{Spree.user_class.table_name}.ship_address_id)
|
110
|
+
OR (spree_addresses.lastname #{LIKE} :search AND spree_addresses.id = #{Spree.user_class.table_name}.ship_address_id)",
|
111
111
|
{ search: "#{params[:q].strip}%" })
|
112
112
|
.limit(params[:limit] || 100)
|
113
113
|
else
|
@@ -50,7 +50,12 @@
|
|
50
50
|
<tr class="show-tracking total">
|
51
51
|
<td colspan="5">
|
52
52
|
<% if carton.tracking.present? %>
|
53
|
-
<strong><%= Spree::Carton.human_attribute_name(:tracking) %>:</strong>
|
53
|
+
<strong><%= Spree::Carton.human_attribute_name(:tracking) %>:</strong>
|
54
|
+
<% if carton.tracking_url %>
|
55
|
+
<%= link_to carton.tracking, carton.tracking_url, target: "_blank" %>
|
56
|
+
<% else %>
|
57
|
+
<%= carton.tracking %>
|
58
|
+
<% end %>
|
54
59
|
<% else %>
|
55
60
|
<i><%= t('spree.no_tracking_present') %></i>
|
56
61
|
<% end %>
|
@@ -19,12 +19,6 @@
|
|
19
19
|
<%= t('.multiple_codes') %>
|
20
20
|
</label>
|
21
21
|
</div>
|
22
|
-
<div class="form-check">
|
23
|
-
<label class="form-check-label">
|
24
|
-
<%= radio_button_tag('activation_type', 'path', activation_type == 'path') %>
|
25
|
-
<%= t('.path') %>
|
26
|
-
</label>
|
27
|
-
</div>
|
28
22
|
</div>
|
29
23
|
<div class="col-9">
|
30
24
|
<input name="promotion[apply_automatically]" type="hidden" value="0">
|
@@ -60,11 +54,5 @@
|
|
60
54
|
<% end %>
|
61
55
|
</div>
|
62
56
|
|
63
|
-
<div data-activation-type="path">
|
64
|
-
<div class="field" id="promotion_path_field">
|
65
|
-
<%= f.label :path, class: "required" %>
|
66
|
-
<%= f.text_field :path, class: "fullwidth", required: true %>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
57
|
</div>
|
70
58
|
</div>
|
@@ -5,21 +5,12 @@
|
|
5
5
|
<div class="row">
|
6
6
|
<div id="general_fields" class="col-9">
|
7
7
|
<div class="row">
|
8
|
-
<div class="col-
|
8
|
+
<div class="col-12">
|
9
9
|
<%= f.field_container :name do %>
|
10
10
|
<%= f.label :name, class: 'required' %>
|
11
11
|
<%= f.text_field :name, class: 'fullwidth', required: true %>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<%= f.field_container :advertise do %>
|
15
|
-
<label>
|
16
|
-
<%= f.check_box :advertise %>
|
17
|
-
<%= Spree::Promotion.human_attribute_name :advertise %>
|
18
|
-
</label>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="col-9">
|
23
14
|
<%= f.field_container :description do %>
|
24
15
|
<%= f.label :description %><br />
|
25
16
|
<%= f.text_area :description, rows: 7, class: 'fullwidth' %>
|
@@ -11,8 +11,8 @@
|
|
11
11
|
<tbody>
|
12
12
|
<% @reports.each do |key, value| %>
|
13
13
|
<tr data-hook="reports_row">
|
14
|
-
<td><%= link_to value[:name], send("#{key}_admin_reports_url".to_sym) %></td>
|
15
|
-
<td><%= value[:description] %></td>
|
14
|
+
<td><%= link_to t(value[:name], scope: 'spree'), send("#{key}_admin_reports_url".to_sym) %></td>
|
15
|
+
<td><%= t(value[:description], scope: 'spree') %></td>
|
16
16
|
</tr>
|
17
17
|
<% end %>
|
18
18
|
</tbody>
|
@@ -6,9 +6,16 @@
|
|
6
6
|
<% if try_spree_current_user %>
|
7
7
|
<ul id="login-nav" class="admin-login-nav">
|
8
8
|
<li data-hook="user-account-link">
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
<% if can?(:admin, try_spree_current_user) %>
|
10
|
+
<%= link_to spree.edit_admin_user_path(try_spree_current_user) do %>
|
11
|
+
<i class='fa fa-user'></i>
|
12
|
+
<%= try_spree_current_user.email %>
|
13
|
+
<% end %>
|
14
|
+
<% else %>
|
15
|
+
<a>
|
16
|
+
<i class='fa fa-user'></i>
|
17
|
+
<%= try_spree_current_user.email %>
|
18
|
+
</a>
|
12
19
|
<% end %>
|
13
20
|
</li>
|
14
21
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
<% if can? :display, Spree::CustomerReturn %>
|
50
50
|
<% if @order.completed? %>
|
51
|
-
<li class="<%= "active" if current == "Customer Returns" %>">
|
51
|
+
<li class="<%= "active" if current == "Customer Returns" %>" data-hook='admin_order_tabs_customer_returns'>
|
52
52
|
<%= link_to plural_resource_name(Spree::CustomerReturn), spree.admin_order_customer_returns_url(@order) %>
|
53
53
|
</li>
|
54
54
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="row">
|
2
|
-
|
3
|
-
<div data-hook="bill_address_wrapper" class="col-6">
|
2
|
+
|
3
|
+
<div data-hook="bill_address_wrapper" class="col-6 js-addresses-form">
|
4
4
|
<fieldset class="no-border-bottom">
|
5
5
|
<legend align="center"><%= t('spree.billing_address') %></legend>
|
6
6
|
<%= f.fields_for :bill_address, @user.bill_address || Spree::Address.build_default do |ba_form| %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
</fieldset>
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<div data-hook="ship_address_wrapper" class="col-6">
|
12
|
+
<div data-hook="ship_address_wrapper" class="col-6 js-addresses-form">
|
13
13
|
<fieldset class="no-border-bottom">
|
14
14
|
<legend align="center"><%= t('spree.shipping_address') %></legend>
|
15
15
|
<%= f.fields_for :ship_address, @user.ship_address || Spree::Address.build_default do |sa_form| %>
|
@@ -10,9 +10,9 @@ module Spree
|
|
10
10
|
describe Admin::PaymentMethodsController, type: :controller do
|
11
11
|
stub_authorization!
|
12
12
|
|
13
|
-
|
14
|
-
let(:payment_method) { GatewayWithPassword.create!(name: "Bogus", preferred_password: "haxme") }
|
13
|
+
let(:payment_method) { GatewayWithPassword.create!(name: "Bogus", preferred_password: "haxme") }
|
15
14
|
|
15
|
+
context "GatewayWithPassword" do
|
16
16
|
before do
|
17
17
|
allow(Rails.application.config.spree).to receive(:payment_methods).and_return([GatewayWithPassword])
|
18
18
|
end
|
@@ -52,7 +52,7 @@ module Spree
|
|
52
52
|
expect(response).to redirect_to spree.new_admin_payment_method_path
|
53
53
|
end
|
54
54
|
|
55
|
-
describe "
|
55
|
+
describe "#index" do
|
56
56
|
subject { get :index }
|
57
57
|
|
58
58
|
let!(:first_method) { GatewayWithPassword.create! name: "First", preferred_password: "1235" }
|
@@ -70,5 +70,26 @@ module Spree
|
|
70
70
|
expect(assigns(:payment_methods).to_a).to eql([second_method, first_method])
|
71
71
|
end
|
72
72
|
end
|
73
|
+
|
74
|
+
describe "#update" do
|
75
|
+
# Regression test for https://github.com/solidusio/solidus/issues/2789
|
76
|
+
let(:params) do
|
77
|
+
{
|
78
|
+
id: payment_method.id,
|
79
|
+
payment_method: {
|
80
|
+
name: 'Check',
|
81
|
+
type: 'Spree::PaymentMethod::Check'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'updates the resource' do
|
87
|
+
put :update, params: params
|
88
|
+
|
89
|
+
expect(response).to redirect_to(spree.edit_admin_payment_method_path(payment_method))
|
90
|
+
response_payment_method = Spree::PaymentMethod.find(payment_method.id)
|
91
|
+
expect(response_payment_method.name).to eql('Check')
|
92
|
+
end
|
93
|
+
end
|
73
94
|
end
|
74
95
|
end
|
@@ -9,24 +9,16 @@ describe Spree::Admin::ReportsController, type: :controller do
|
|
9
9
|
it 'should contain sales_total' do
|
10
10
|
expect(Spree::Admin::ReportsController.available_reports.keys.include?(:sales_total)).to be true
|
11
11
|
end
|
12
|
-
|
13
|
-
it 'should have the proper sales total report description' do
|
14
|
-
expect(Spree::Admin::ReportsController.available_reports[:sales_total][:description]).to eql('Sales Total For All Orders')
|
15
|
-
end
|
16
12
|
end
|
17
13
|
|
18
14
|
describe 'ReportsController.add_available_report!' do
|
19
15
|
context 'when adding the report name' do
|
20
16
|
it 'should contain the report' do
|
21
|
-
I18n.backend.store_translations(:en, spree: {
|
22
|
-
some_report: 'Awesome Report',
|
23
|
-
some_report_description: 'This report is great!'
|
24
|
-
})
|
25
17
|
Spree::Admin::ReportsController.add_available_report!(:some_report)
|
26
18
|
expect(Spree::Admin::ReportsController.available_reports.keys.include?(:some_report)).to be true
|
27
19
|
expect(Spree::Admin::ReportsController.available_reports[:some_report]).to eq(
|
28
|
-
name:
|
29
|
-
description: '
|
20
|
+
name: :some_report,
|
21
|
+
description: 'some_report_description'
|
30
22
|
)
|
31
23
|
end
|
32
24
|
end
|
@@ -12,6 +12,55 @@ describe Spree::Admin::ReturnAuthorizationsController, type: :controller do
|
|
12
12
|
let(:inventory_unit_2) { order.inventory_units.order('id asc')[1] }
|
13
13
|
let(:inventory_unit_3) { order.inventory_units.order('id asc')[2] }
|
14
14
|
|
15
|
+
describe '#fire' do
|
16
|
+
let(:return_authorization) { create(:return_authorization, order: order) }
|
17
|
+
|
18
|
+
context 'with the event parameter set' do
|
19
|
+
let(:params) do
|
20
|
+
{
|
21
|
+
id: return_authorization.to_param,
|
22
|
+
order_id: return_authorization.order.to_param,
|
23
|
+
e: event,
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'when event method exists on return authorization' do
|
28
|
+
let(:event) { 'cancel' }
|
29
|
+
|
30
|
+
it 'sends method with ! to return authorization and redirect back' do
|
31
|
+
get :fire, params: params
|
32
|
+
|
33
|
+
expect(response).to redirect_to(admin_order_return_authorizations_path(order))
|
34
|
+
expect(flash[:success]).to eq 'Return merchandise authorization updated'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'when event method does not exist on return authorization' do
|
39
|
+
let(:event) { 'do_something_crazy' }
|
40
|
+
|
41
|
+
it 'redirects back with an error message' do
|
42
|
+
get :fire, params: params
|
43
|
+
|
44
|
+
expect(response).to redirect_to(admin_order_return_authorizations_path(order))
|
45
|
+
expect(flash[:error]).to eq 'Cannot perform this action on return merchandise authorization'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context 'when event method exists but it is not a state machine event' do
|
50
|
+
let(:event) { 'destroy' }
|
51
|
+
|
52
|
+
it 'redirects back with an error message' do
|
53
|
+
expect(return_authorization).not_to receive :destroy!
|
54
|
+
|
55
|
+
get :fire, params: params
|
56
|
+
|
57
|
+
expect(response).to redirect_to(admin_order_return_authorizations_path(order))
|
58
|
+
expect(flash[:error]).to eq 'Cannot perform this action on return merchandise authorization'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
15
64
|
describe "#load_return_reasons" do
|
16
65
|
let!(:inactive_rma_reason) { create(:return_reason, active: false) }
|
17
66
|
|
@@ -180,20 +180,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
|
|
180
180
|
expect(promotion.rules).to be_blank
|
181
181
|
end
|
182
182
|
|
183
|
-
it "should allow an admin to create a promo requiring a landing page to be visited" do
|
184
|
-
fill_in "Name", with: "SAVE SAVE SAVE"
|
185
|
-
choose "URL Path"
|
186
|
-
fill_in "Path", with: "content/cvv"
|
187
|
-
click_button "Create"
|
188
|
-
expect(page).to have_title("SAVE SAVE SAVE - Promotions")
|
189
|
-
|
190
|
-
promotion = Spree::Promotion.find_by(name: "SAVE SAVE SAVE")
|
191
|
-
expect(promotion.path).to eq("content/cvv")
|
192
|
-
expect(promotion).not_to be_apply_automatically
|
193
|
-
expect(promotion.codes).to be_empty
|
194
|
-
expect(promotion.rules).to be_blank
|
195
|
-
end
|
196
|
-
|
197
183
|
it "should allow an admin to create a promo with generated codes" do
|
198
184
|
fill_in "Name", with: "SAVE SAVE SAVE"
|
199
185
|
choose "Multiple promotion codes"
|
@@ -4,8 +4,10 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe "spree/admin/shared/_navigation_footer", type: :view do
|
6
6
|
let(:user) { FactoryBot.build_stubbed(:admin_user) }
|
7
|
+
let(:ability) { Object.new.extend(CanCan::Ability) }
|
7
8
|
before do
|
8
9
|
allow(view).to receive(:try_spree_current_user).and_return(user)
|
10
|
+
allow(controller).to receive(:current_ability).and_return(ability)
|
9
11
|
end
|
10
12
|
|
11
13
|
it "has a a login-nav section" do
|
@@ -13,9 +15,32 @@ describe "spree/admin/shared/_navigation_footer", type: :view do
|
|
13
15
|
expect(rendered).to have_selector("#login-nav")
|
14
16
|
end
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
context "authorized user" do
|
19
|
+
before do
|
20
|
+
ability.can :admin, user
|
21
|
+
end
|
22
|
+
|
23
|
+
it "has a user-account-link that links to edit_admin_user_path" do
|
24
|
+
render
|
25
|
+
expect(rendered).to have_link(user.email, href: Spree::Core::Engine.routes.url_helpers.edit_admin_user_path(user))
|
26
|
+
end
|
27
|
+
|
28
|
+
it "has not a user-account-link that links to admin_path" do
|
29
|
+
render
|
30
|
+
expect(rendered).to_not have_link(user.email, href: Spree::Core::Engine.routes.url_helpers.admin_path)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context "unauthorized user" do
|
35
|
+
it "has a user-account-link that links to admin_path" do
|
36
|
+
render
|
37
|
+
expect(rendered).to_not have_link(user.email, href: Spree::Core::Engine.routes.url_helpers.admin_path)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "has not a user-account-link that links to edit_admin_user_path" do
|
41
|
+
render
|
42
|
+
expect(rendered).to_not have_link(user.email, href: Spree::Core::Engine.routes.url_helpers.edit_admin_user_path(user))
|
43
|
+
end
|
19
44
|
end
|
20
45
|
|
21
46
|
context "with a required spree_logout_path helper" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: solidus_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.7.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.7.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coffee-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +176,7 @@ files:
|
|
176
176
|
- app/assets/config/solidus_backend_manifest.js
|
177
177
|
- app/assets/images/solidus-style-guide-logo.png
|
178
178
|
- app/assets/javascripts/spree/backend.js
|
179
|
+
- app/assets/javascripts/spree/backend/addresses.js
|
179
180
|
- app/assets/javascripts/spree/backend/adjustments.js
|
180
181
|
- app/assets/javascripts/spree/backend/admin.js
|
181
182
|
- app/assets/javascripts/spree/backend/backbone-overrides.js
|
@@ -225,7 +226,6 @@ files:
|
|
225
226
|
- app/assets/javascripts/spree/backend/routes.js
|
226
227
|
- app/assets/javascripts/spree/backend/shipments.js
|
227
228
|
- app/assets/javascripts/spree/backend/spree-select2.js
|
228
|
-
- app/assets/javascripts/spree/backend/stock_location.js
|
229
229
|
- app/assets/javascripts/spree/backend/stock_management.js
|
230
230
|
- app/assets/javascripts/spree/backend/store_credits.js
|
231
231
|
- app/assets/javascripts/spree/backend/style_guide.js
|
@@ -993,7 +993,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
993
993
|
version: 1.8.23
|
994
994
|
requirements:
|
995
995
|
- none
|
996
|
-
|
996
|
+
rubyforge_project:
|
997
|
+
rubygems_version: 2.6.10
|
997
998
|
signing_key:
|
998
999
|
specification_version: 4
|
999
1000
|
summary: Admin interface for the Solidus e-commerce framework.
|