Sha256: 7c05d97a3f0a983b401938e392c1dafbbd77367c1f987a31417c47eb2d06d0ec
Contents?: true
Size: 1.68 KB
Versions: 38
Compression:
Stored size: 1.68 KB
Contents
# frozen_string_literal: true require 'avm/launcher/git/base' require 'avm/tools/runner' require 'tmpdir' require 'fileutils' ::RSpec.describe ::Avm::Tools::Runner::AppSrc::Issue::Complete, git: true do let(:remote_name) { 'origin' } let(:issue_ref) { 'issue_123' } let(:remote_repos) { stubbed_git_local_repo(true) } let(:local_repos) { stubbed_git_local_repo } let(:eac_local_repos) { ::Avm::Launcher::Git::Base.new(local_repos.root_path.to_path) } context 'when branch is pushed' do before do eac_local_repos.assert_remote_url(remote_name, remote_repos.root_path.to_path) local_repos.command('checkout', '-b', issue_ref).execute! local_repos.file('myfile1.txt').touch local_repos.command('add', '.').execute! local_repos.command('commit', '-m', 'myfile1.txt').execute! local_repos.command('push', 'origin', issue_ref).execute! end it 'remote repos has a issue branch' do expect(eac_local_repos.remote_hashs(remote_name)).to include("refs/heads/#{issue_ref}") end it 'remote repos does not have a issue tag' do expect(eac_local_repos.remote_hashs(remote_name)).not_to include("refs/tags/#{issue_ref}") end context 'when "git issue complete" is called' do before do ::Avm::Tools::Runner.run(argv: ['app-src', '-C', eac_local_repos] + %w[issue complete --yes]) end it 'remote repos does not have a issue branch' do expect(eac_local_repos.remote_hashs(remote_name)).not_to include("refs/heads/#{issue_ref}") end it 'remote repos has a issue tag' do expect(eac_local_repos.remote_hashs(remote_name)).to include("refs/tags/#{issue_ref}") end end end end
Version data entries
38 entries across 38 versions & 1 rubygems