diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:45 +0000 |
commit | aaf59610548d9b0fd01acfd50e831cbe519ecba2 (patch) | |
tree | b6505abedcd965ebae5118b504b185b63129dc4c /spec/models/issue_spec.rb | |
parent | 1363ca12f1f07c634647cf55c4c16b7401098673 (diff) | |
download | gitlab-ce-aaf59610548d9b0fd01acfd50e831cbe519ecba2.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 | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 66b298bb36f..6f12d72c723 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -313,19 +313,16 @@ describe Issue do end describe '#moved?' do - let(:issue) { create(:issue) } - - subject { issue.moved? } + context 'when issue has not been moved' do + subject { build_stubbed(:issue) } - context 'issue not moved' do - it { is_expected.to eq false } + it { is_expected.not_to be_moved } end - context 'issue already moved' do - let(:moved_to_issue) { create(:issue) } - let(:issue) { create(:issue, moved_to: moved_to_issue) } + context 'when issue has already been moved' do + subject { build_stubbed(:issue, moved_to: build_stubbed(:issue)) } - it { is_expected.to eq true } + it { is_expected.to be_moved } end end |