upgrade pat3
This commit is contained in:
@@ -45,4 +45,15 @@ describe :section do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#tables_with_active_list_id' do
|
||||
it 'caches the result for tables call' do
|
||||
section = create :section
|
||||
table = create :table, section: section
|
||||
section = Section.find section.id # ensure a totally clean object
|
||||
section.tables_with_active_list_id
|
||||
Table.database.stub(:view).and_raise 'No view should be called here'
|
||||
expect{ section.tables }.not_to raise_error
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user