Project

General

Profile

Patch #28934 » use_migration_context_with_test.patch

Tatsuya Saito, 2018-07-05 16:48

View differences:

lib/redmine/plugin.rb (working copy)
def migrate_plugin(plugin, version)
self.current_plugin = plugin
return if current_version(plugin) == version
migrate(plugin.migration_directory, version)
ActiveRecord::MigrationContext.new(plugin.migration_directory).migrate(version)
end
def current_version(plugin=current_plugin)
test/unit/lib/redmine/plugin_test.rb (working copy)
Rails.logger.expects(:warn)
@klass.register(:bar) { settings :partial => 'foo/settings' }
end
def test_migrate_redmine_plugin
@klass.register :foo do
name 'Foo plugin'
version '0.0.1'
end
assert Redmine::Plugin.migrate('foo')
end
end
(3-3/4)