mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 15:35:59 +01:00
Add plugin updating capability
This commit is contained in:
22
src/test/scala/plugin/PluginSystemSpec.scala
Normal file
22
src/test/scala/plugin/PluginSystemSpec.scala
Normal file
@@ -0,0 +1,22 @@
|
||||
package plugin
|
||||
|
||||
import org.specs2.mutable._
|
||||
|
||||
class PluginSystemSpec extends Specification {
|
||||
|
||||
"isUpdatable" should {
|
||||
"return true for updattable plugin" in {
|
||||
PluginSystem.isUpdatable("1.0.0", "1.0.1") must beTrue
|
||||
PluginSystem.isUpdatable("1.0.0", "1.1.0") must beTrue
|
||||
PluginSystem.isUpdatable("1.1.1", "1.2.0") must beTrue
|
||||
PluginSystem.isUpdatable("1.2.1", "2.0.0") must beTrue
|
||||
}
|
||||
"return false for not updattable plugin" in {
|
||||
PluginSystem.isUpdatable("1.0.0", "1.0.0") must beFalse
|
||||
PluginSystem.isUpdatable("1.0.1", "1.0.0") must beFalse
|
||||
PluginSystem.isUpdatable("1.1.1", "1.1.0") must beFalse
|
||||
PluginSystem.isUpdatable("2.0.0", "1.2.1") must beFalse
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user