diff options
-rw-r--r-- | db/migrate/089_remove_charity_number.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 3 | ||||
-rw-r--r-- | spec/models/public_body_spec.rb | 8 |
3 files changed, 19 insertions, 2 deletions
diff --git a/db/migrate/089_remove_charity_number.rb b/db/migrate/089_remove_charity_number.rb new file mode 100644 index 000000000..9b7d0935b --- /dev/null +++ b/db/migrate/089_remove_charity_number.rb @@ -0,0 +1,10 @@ +class RemoveCharityNumber < ActiveRecord::Migration + def self.up + remove_column :public_bodies, :charity_number + end + + def self.down + raise "No reverse migration" + end +end + diff --git a/db/schema.rb b/db/schema.rb index b63c0d8cf..7ac84dd30 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 88) do +ActiveRecord::Schema.define(:version => 89) do create_table "acts_as_xapian_jobs", :force => true do |t| t.string "model", :null => false @@ -163,7 +163,6 @@ ActiveRecord::Schema.define(:version => 88) do t.text "notes", :default => "", :null => false t.string "first_letter", :null => false t.text "publication_scheme", :default => "", :null => false - t.text "charity_number", :default => "", :null => false end add_index "public_bodies", ["first_letter"], :name => "index_public_bodies_on_first_letter" diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index 8bd419005..d99fec40d 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -76,6 +76,14 @@ describe PublicBody, " using machine tags" do @public_body.get_tag_value('wondrous').should == nil @public_body.get_tag_value('notthere').should == false end + + it 'should cope with colons in value' do + @public_body.tag_string = 'url:http://www.flourish.org' + @public_body.tag_string.should == 'url:http://www.flourish.org' + + @public_body.has_tag?('url').should be_true + @public_body.get_tag_value('url').should == 'http://www.flourish.org' + end end describe PublicBody, " when making up the URL name" do |