Sha256: 91b22ed3a0e1fa277d1817c182d2c96f347163c405e6847867a138b622bb3eb5
Contents?: true
Size: 868 Bytes
Versions: 1
Compression:
Stored size: 868 Bytes
Contents
require 'test_helper' class StoreTest < TestCase def setup @repo = FormObject::Store.instance end def test_should_have_base_auth_in_collection assert_equal BaseAuthForm, @repo.find(name: :base_auth).first.form end def test_should_have_twitter_in_collection assert_equal TwitterAuthForm, @repo.find(name: :twitter).first.form end def test_repo_shold_find_form_for_model critery = {} assert_operator 0, :<, @repo.find(critery).count end def test_should_find_by_model_class assert_equal User, @repo.find(model: User).first.model end def test_repo_shold_find_form_for_model_with_critery critery = {name: :base_auth} assert_operator 0, :<, @repo.find(critery).count end def test_should_not_find_forms_for_wrong_critery critery = { name: :wrong_name } assert_equal [], @repo.find(critery) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
form_object-0.1.1 | test/lib/store_test.rb |