Commit 02a4cf4f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents e6a23d6b 73fff8d9
require 'spec_helper' require 'spec_helper'
describe LabelLink, models: true do describe LabelLink, models: true do
let(:label) { create(:label_link) } it { expect(build(:label_link)).to be_valid }
it { expect(label).to be_valid }
it { is_expected.to belong_to(:label) } it { is_expected.to belong_to(:label) }
it { is_expected.to belong_to(:target) } it { is_expected.to belong_to(:target) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment