Skip to content

Commit

Permalink
add demoderation test to close #14
Browse files Browse the repository at this point in the history
  • Loading branch information
zr2d2 committed Mar 18, 2012
1 parent fdded1f commit 64f4a68
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ GEM
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
Expand Down
13 changes: 7 additions & 6 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
t.string "file_name"
t.string "file_type"
t.integer "file_size"
t.binary "file_data", :limit => 16777215
t.binary "file_data", :limit => 10485760
t.datetime "created_at"
t.datetime "updated_at"
end
Expand All @@ -73,15 +73,16 @@
t.integer "group_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "level", :default => 0
t.integer "level", :default => 0
t.boolean "moderation_flag"
end

create_table "positions", :force => true do |t|
t.text "style"
t.decimal "top", :precision => 6, :scale => 5, :default => 0.0
t.decimal "left", :precision => 6, :scale => 5, :default => 0.0
t.decimal "bottom", :precision => 6, :scale => 5, :default => 0.0
t.decimal "right", :precision => 6, :scale => 5, :default => 0.0
t.decimal "top", :default => 0.0
t.decimal "left", :default => 0.0
t.decimal "bottom", :default => 0.0
t.decimal "right", :default => 0.0
t.integer "field_id"
t.integer "template_id"
t.datetime "created_at"
Expand Down
8 changes: 8 additions & 0 deletions test/functional/contents_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,13 @@ def setup
get :index
assert_response :success
end

test "should demoderate submissions on edit" do
put :update, :id => contents(:sample_ticker).id, :duration => "7"
related_submissions = contents(:sample_ticker).submissions
related_submissions.each do |submission|
assert_nil(submission.moderation_flag)
end
end

end

0 comments on commit 64f4a68

Please sign in to comment.