From 59c851193d91a087cd62cc6380185e13d52969d4 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Mon, 9 Feb 2015 16:51:38 -0700 Subject: [PATCH] Uniqueness: Add missing tests for text columns --- .../active_record/validate_uniqueness_of_matcher_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb b/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb index 660c61653..006972be5 100644 --- a/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb +++ b/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb @@ -312,6 +312,11 @@ value_type: :time end + context 'when one of the scoped attributes is a text column' do + include_context 'it supports scoped attributes of a certain type', + column_type: :text + end + if database_supports_uuid_columns? context 'when one of the scoped attributes is a UUID column' do include_context 'it supports scoped attributes of a certain type', @@ -616,7 +621,7 @@ def attributes_with_values_for(model) def dummy_value_for(attribute_type) case attribute_type - when :string + when :string, :text 'dummy value' when :integer 1