Add RSpec tests for models and controllers

Adding model and controller specs.
I am for the change that @strika mentioned because it's much nicer usage of ActiveRecord API. It's also easier to read and understand.