wip, stated the serialized model

This commit is contained in:
Ilya Zhitomirskiy 2011-11-08 18:51:54 -08:00 committed by Maxwell Salzberg
parent 03ca34767a
commit 7667029e71
4 changed files with 39 additions and 1 deletions

View file

@ -0,0 +1,7 @@
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class AccountDeletion < ActiveRecord::Base
end

View file

@ -0,0 +1,12 @@
class CreateAccountDeletions < ActiveRecord::Migration
def self.up
create_table :account_deletions do |t|
t.string :diaspora_id
t.integer :person_id
end
end
def self.down
drop_table :account_deletions
end
end

View file

@ -10,7 +10,12 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20111103184050) do
ActiveRecord::Schema.define(:version => 20111109023618) do
create_table "account_deletion", :force => true do |t|
t.string "diaspora_id"
t.integer "person_id"
end
create_table "aspect_memberships", :force => true do |t|
t.integer "aspect_id", :null => false

View file

@ -0,0 +1,14 @@
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'spec_helper'
describe AccountDeletion do
it 'gets initialized with diaspora_id' do
AccountDeletion.new(:diaspora_id => alice.person.diaspora_handle).should be_true
end
end