spec/lib/gitlab/build/info/git_spec.rb [286:312]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        end
      end

      context 'on merge requests' do
        context 'when they target a feature branch' do
          before do
            stub_env_var('CI_MERGE_REQUEST_SOURCE_BRANCH_NAME', 'my-feature-branch')
            stub_env_var('CI_MERGE_REQUEST_TARGET_BRANCH_NAME', 'master')
          end

          it 'returns the latest available tag' do
            expect(described_class.latest_tag).to eq('16.1.1+ee.0')
          end
        end

        context 'when they target a stable branch' do
          before do
            stub_env_var('CI_MERGE_REQUEST_SOURCE_BRANCH_NAME', 'my-feature-branch')
            stub_env_var('CI_MERGE_REQUEST_TARGET_BRANCH_NAME', '15-10-stable')
          end

          it 'returns the latest tag in the stable version series' do
            expect(described_class.latest_tag).to eq('15.10.0+ee.0')
          end
        end
      end
    end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



spec/lib/gitlab/build/info/git_spec.rb [449:475]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        end
      end

      context 'on merge requests' do
        context 'when they target a feature branch' do
          before do
            stub_env_var('CI_MERGE_REQUEST_SOURCE_BRANCH_NAME', 'my-feature-branch')
            stub_env_var('CI_MERGE_REQUEST_TARGET_BRANCH_NAME', 'master')
          end

          it 'returns the latest available tag' do
            expect(described_class.latest_tag).to eq('16.1.1+ee.0')
          end
        end

        context 'when they target a stable branch' do
          before do
            stub_env_var('CI_MERGE_REQUEST_SOURCE_BRANCH_NAME', 'my-feature-branch')
            stub_env_var('CI_MERGE_REQUEST_TARGET_BRANCH_NAME', '15-10-stable')
          end

          it 'returns the latest tag in the stable version series' do
            expect(described_class.latest_tag).to eq('15.10.0+ee.0')
          end
        end
      end
    end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



