diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-11 15:24:19 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-11 15:24:19 +0000 |
commit | 02a4cf4f32f5e555bd481ed767990e1abb43f782 (patch) | |
tree | d9b21b8d35e3fc9a869622d4d78df86e62b7e1d4 | |
parent | e6a23d6bc86e0c8231304183d6e1f8ba69599e86 (diff) | |
parent | 73fff8d9e33d31b0958b7ef889a6ad3ff6dbf4c5 (diff) | |
download | gitlab-ce-02a4cf4f32f5e555bd481ed767990e1abb43f782.tar.gz |
Merge branch 'build-instead-create-in-label-link-spec' into 'master'
Build instead create in label_link model spec
## What does this MR do?
This MR improves spec for label link model.
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
Because for check validations, we can use build instead create a record in the database.
## Screenshots (if relevant)
No
## Does this MR meet the acceptance criteria?
- n/a [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- n/a [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- n/a API support added
- Tests
- n/a Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- n/a [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
See merge request !6792
-rw-r--r-- | spec/models/label_link_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/models/label_link_spec.rb b/spec/models/label_link_spec.rb index 5e6f8ca1528..c18ed8574b1 100644 --- a/spec/models/label_link_spec.rb +++ b/spec/models/label_link_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' describe LabelLink, models: true do - let(:label) { create(:label_link) } - it { expect(label).to be_valid } + it { expect(build(:label_link)).to be_valid } it { is_expected.to belong_to(:label) } it { is_expected.to belong_to(:target) } |