Skip to content

Commit b3785b3

Browse files
committed
Record not unique fixes.
1 parent cd3d05d commit b3785b3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ if (wp_version = ENV['WILL_PAGINATE_VERSION'])
2020
gem 'will_paginate', wp_version
2121
end
2222

23-
gem 'active_model_serializers'
23+
gem 'active_model_serializers', ENV['AMS_VERSION'] || '> 0.0'
2424

2525
gemspec

spec/integration/active_record_spec.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
end
4343
end
4444

45-
pending 'should automatically map ActiveRecord::RecordNotUnique' do
45+
it 'should automatically map ActiveRecord::RecordNotUnique' do
46+
Fish.connection.add_index :fish, :latin_name, unique: true
4647
attrs = {:token => "a", :name => "Test Fish", :latin_name => "Latin Name", :child_number => 5}
4748
Fish.create! attrs
4849
action_is { Fish.create!(attrs); raise "This should not happen..." }

0 commit comments

Comments
 (0)