gitlab-org--gitlab-foss/spec/lib/gitlab/upgrader_spec.rb
Dmitriy Zaporozhets 440f3f384f
Minor version upgrader
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-13 15:18:57 +02:00

24 lines
649 B
Ruby

require 'spec_helper'
describe Gitlab::Upgrader do
let(:upgrader) { Gitlab::Upgrader.new }
let(:current_version) { Gitlab::VERSION }
describe 'current_version_raw' do
it { upgrader.current_version_raw.should == current_version }
end
describe 'latest_version?' do
it 'should be true if newest version' do
upgrader.stub(latest_version_raw: current_version)
upgrader.latest_version?.should be_true
end
end
describe 'latest_version_raw' do
it 'should be latest version for GitLab 5' do
upgrader.stub(current_version_raw: "5.3.0")
upgrader.latest_version_raw.should == "v5.4.2"
end
end
end