Adding Log model for database-based log messages

This commit is contained in:
Christoph Haas 2015-04-27 00:15:55 +02:00
parent e1bef18152
commit ac3d52a66e
4 changed files with 61 additions and 0 deletions

12
test/fixtures/logs.yml vendored Normal file
View file

@ -0,0 +1,12 @@
# Read about fixtures at
# http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
message: Import of DEB archive successful.
level: info
section: importer
two:
message: Upload of package failed.
level: error
section: upload

9
test/models/log_test.rb Normal file
View file

@ -0,0 +1,9 @@
require "test_helper"
class LogTest < ActiveSupport::TestCase
def log
@log ||= Log.new
end
end