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

Fixes for MySQL #2468

Merged
merged 3 commits into from
Jan 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion backend/spec/features/admin/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
end

context "member since" do
before do
user_a.update_column(:created_at, 2.weeks.ago)
end

it_behaves_like "a sortable attribute" do
let(:text_match_1) { user_a.email }
let(:text_match_2) { user_b.email }
Expand All @@ -107,7 +111,6 @@
end

it 'displays the correct results for a user search by creation date' do
user_a.update_column(:created_at, 2.weeks.ago)
fill_in 'q_created_at_lt', with: 1.week.ago
click_button 'Search'
within_table('listing_users') do
Expand Down
5 changes: 4 additions & 1 deletion core/db/migrate/20160101010000_solidus_one_four.rb
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,10 @@ def up
t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
t.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
t.index ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
t.index ["variant_id", "stock_location_id"], name: "index_spree_stock_items_on_variant_id_and_stock_location_id", unique: true, where: "deleted_at is null"

if connection.supports_partial_index?
t.index ["variant_id", "stock_location_id"], name: "index_spree_stock_items_on_variant_id_and_stock_location_id", unique: true, where: "deleted_at is null"
end
end

create_table "spree_stock_locations", force: :cascade do |t|
Expand Down
2 changes: 2 additions & 0 deletions core/spec/models/spree/classification_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def positions_to_be_valid(taxon)
taxon = taxon_with_5_products
classification = taxon.classifications.first
product = classification.product
product.update_columns(updated_at: 1.day.ago)
expect {
classification.touch
}.to change { product.reload.updated_at }
Expand All @@ -102,6 +103,7 @@ def positions_to_be_valid(taxon)
it "touches the taxon" do
taxon = taxon_with_5_products
classification = taxon.classifications.first
taxon.update_columns(updated_at: 1.day.ago)
expect {
classification.touch
}.to change { taxon.reload.updated_at }
Expand Down