From 188c30eeea3ff70bccbe357ccd3b93ddf7ad7e80 Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 9 Mar 2010 16:18:28 -0500 Subject: [PATCH] add janitor trials --- app/models/janitor_trial.rb | 3 +++ .../20100309211553_create_janitor_trials.rb | 16 ++++++++++++++++ test/fixtures/janitor_trials.yml | 11 +++++++++++ test/unit/janitor_trial_test.rb | 8 ++++++++ 4 files changed, 38 insertions(+) create mode 100644 app/models/janitor_trial.rb create mode 100644 db/migrate/20100309211553_create_janitor_trials.rb create mode 100644 test/fixtures/janitor_trials.yml create mode 100644 test/unit/janitor_trial_test.rb diff --git a/app/models/janitor_trial.rb b/app/models/janitor_trial.rb new file mode 100644 index 000000000..a1e4bff40 --- /dev/null +++ b/app/models/janitor_trial.rb @@ -0,0 +1,3 @@ +class JanitorTrial < ActiveRecord::Base + belongs_to :user +end diff --git a/db/migrate/20100309211553_create_janitor_trials.rb b/db/migrate/20100309211553_create_janitor_trials.rb new file mode 100644 index 000000000..6afac0e32 --- /dev/null +++ b/db/migrate/20100309211553_create_janitor_trials.rb @@ -0,0 +1,16 @@ +class CreateJanitorTrials < ActiveRecord::Migration + def self.up + create_table :janitor_trials do |t| + t.column :user_id, :integer, :null => false + t.column :promoted_at, :datetime + t.column :original_level, :integer, :null => false + t.timestamps + end + + add_inex :janitor_trials, :user_id + end + + def self.down + drop_table :janitor_trials + end +end diff --git a/test/fixtures/janitor_trials.yml b/test/fixtures/janitor_trials.yml new file mode 100644 index 000000000..289334110 --- /dev/null +++ b/test/fixtures/janitor_trials.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/unit/janitor_trial_test.rb b/test/unit/janitor_trial_test.rb new file mode 100644 index 000000000..232663cd3 --- /dev/null +++ b/test/unit/janitor_trial_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class JanitorTrialTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end