File tree 2 files changed +0
-28
lines changed
2 files changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ class Store < Spree::Base
25
25
before_save :ensure_default_exists_and_is_unique
26
26
before_destroy :validate_not_default
27
27
28
- scope :by_url , lambda { |url | where ( "url like ?" , "%#{ url } %" ) }
29
-
30
- class << self
31
- deprecate by_url : "Spree::Store.by_url is DEPRECATED" , deprecator : Spree ::Deprecation
32
- end
33
-
34
28
def available_locales
35
29
locales = super ( )
36
30
if locales
Original file line number Diff line number Diff line change 3
3
require 'rails_helper'
4
4
5
5
RSpec . describe Spree ::Store , type : :model do
6
- before do
7
- allow ( Spree ::Deprecation ) . to receive ( :warn ) .
8
- with ( /^by_url is deprecated and will be removed/ , any_args )
9
- end
10
-
11
6
it { is_expected . to respond_to ( :cart_tax_country_iso ) }
12
7
13
- describe ".by_url (deprecated)" do
14
- let! ( :store ) { create ( :store , url : "website1.com\n www.subdomain.com" ) }
15
- let! ( :store_2 ) { create ( :store , url : 'freethewhales.com' ) }
16
-
17
- before do
18
- expect ( Spree ::Deprecation ) . to receive ( :warn ) .
19
- with ( /^by_url is deprecated and will be removed/ , any_args )
20
- end
21
-
22
- it "should find stores by url" do
23
- by_domain = Spree ::Store . by_url ( 'www.subdomain.com' )
24
-
25
- expect ( by_domain ) . to include ( store )
26
- expect ( by_domain ) . not_to include ( store_2 )
27
- end
28
- end
29
-
30
8
describe ".default" do
31
9
it "should ensure saved store becomes default if one doesn't exist yet" do
32
10
expect ( Spree ::Store . where ( default : true ) . count ) . to eq ( 0 )
You can’t perform that action at this time.
0 commit comments