Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 18:09:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 18:09:45 +0300
commitaaf59610548d9b0fd01acfd50e831cbe519ecba2 (patch)
treeb6505abedcd965ebae5118b504b185b63129dc4c /spec/models/issue_spec.rb
parent1363ca12f1f07c634647cf55c4c16b7401098673 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb15
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