scinote-web/test/models/my_module_group_test.rb

23 lines
536 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
require 'test_helper'
require 'helpers/searchable_model_test_helper'
class MyModuleGroupTest < ActiveSupport::TestCase
include SearchableModelTestHelper
def setup
@module_group = my_module_groups(:wf1)
end
2016-10-11 14:25:32 +08:00
should validate_presence_of(:name)
should validate_length_of(:name)
.is_at_most(Constants::NAME_MAX_LENGTH)
2016-10-11 14:25:32 +08:00
2016-02-12 23:52:43 +08:00
test "should validate with valid data" do
assert @module_group.valid?
end
test "where_attributes_like should work" do
attributes_like_test(MyModuleGroup, :name, "expression")
end
end