diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 11:11:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 11:11:44 +0000 |
commit | 25989ab7ef1a444ed2abd5479f176d58e1d9462a (patch) | |
tree | 271bb24f3c7178f320cb9de0be0833a285327d09 /spec/models/issue_spec.rb | |
parent | 9bbb32b29703f3ce33dd35d5101145774b793a6d (diff) | |
download | gitlab-ce-25989ab7ef1a444ed2abd5479f176d58e1d9462a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r-- | spec/models/issue_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 9c58d307c4c..18a1a30eee5 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -138,7 +138,10 @@ describe Issue do end it 'changes the state to closed' do - expect { issue.close }.to change { issue.state }.from('opened').to('closed') + open_state = described_class.available_states[:opened] + closed_state = described_class.available_states[:closed] + + expect { issue.close }.to change { issue.state_id }.from(open_state).to(closed_state) end end @@ -155,7 +158,7 @@ describe Issue do end it 'changes the state to opened' do - expect { issue.reopen }.to change { issue.state }.from('closed').to('opened') + expect { issue.reopen }.to change { issue.state_id }.from(described_class.available_states[:closed]).to(described_class.available_states[:opened]) end end @@ -277,6 +280,7 @@ describe Issue do context 'checking destination project also' do subject { issue.can_move?(user, to_project) } + let(:to_project) { create(:project) } context 'destination project allowed' do @@ -899,4 +903,6 @@ describe Issue do let(:default_params) { { project: project } } end end + + it_behaves_like 'versioned description' end |