Skip to content

Commit

Permalink
Record not unique fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutto committed May 20, 2015
1 parent cd3d05d commit b3785b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -20,6 +20,6 @@ if (wp_version = ENV['WILL_PAGINATE_VERSION'])
gem 'will_paginate', wp_version
end

gem 'active_model_serializers'
gem 'active_model_serializers', ENV['AMS_VERSION'] || '> 0.0'

gemspec
3 changes: 2 additions & 1 deletion spec/integration/active_record_spec.rb
Expand Up @@ -42,7 +42,8 @@
end
end

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

0 comments on commit b3785b3

Please sign in to comment.