This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Text can be auto-migrated when :index and :unique_index are true
[#1103 state:resolved]
- Loading branch information
Showing
4 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')) | ||
|
||
describe DataMapper::Property, 'Text type' do | ||
describe 'migration with an index' do | ||
supported_by :all do | ||
before do | ||
@model = DataMapper::Model.new do | ||
storage_names[:default] = 'anonymous' | ||
|
||
property :id, DataMapper::Types::Serial | ||
property :body, DataMapper::Types::Text, :index => true | ||
end | ||
end | ||
|
||
it 'should allow a migration' do | ||
lambda { | ||
@model.auto_migrate! | ||
}.should_not raise_error(DataObjects::SyntaxError) | ||
end | ||
end | ||
end if defined?(DataObjects::SyntaxError) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters