mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
22 lines
525 B
Ruby
22 lines
525 B
Ruby
require 'test_helper'
|
|
require 'helpers/searchable_model_test_helper'
|
|
|
|
class MyModuleGroupTest < ActiveSupport::TestCase
|
|
include SearchableModelTestHelper
|
|
|
|
def setup
|
|
@module_group = my_module_groups(:wf1)
|
|
end
|
|
|
|
should validate_presence_of(:name)
|
|
should validate_length_of(:name)
|
|
.is_at_most(NAME_MAX_LENGTH)
|
|
|
|
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
|