diff --git a/app/models/organization.rb b/app/models/organization.rb index 5d3e077..4900aba 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -23,4 +23,8 @@ class Organization < Profile restrictions = self.validation_info ? self.validation_info.restrictions : nil restrictions || ('' + _('(not informed)') + '') end + + def pending_validations + CreateEnterprise.pending_for(self) + end end diff --git a/test/unit/organization_test.rb b/test/unit/organization_test.rb index acf897f..9de8d1c 100644 --- a/test/unit/organization_test.rb +++ b/test/unit/organization_test.rb @@ -61,7 +61,9 @@ class OrganizationTest < Test::Unit::TestCase end should 'list pending enterprise validations' do - flunk 'not yet' + org = Organization.new + CreateEnterprise.expects(:pending_for).with(org).returns([]) + assert_equal [], org.pending_validations end end -- libgit2 0.21.2