Added unit tests for ActiveRecord models