Commit 9d44ef2b authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-some-specs' into 'master'

Improve appearance_spec and deploy_key_spec

In appearance_spec.rb we can use build instead create record in db. In deploy_key_spec.rb we can remove unused code.

See merge request !6819
parents 1524832f 31c41a8f
require 'rails_helper' require 'rails_helper'
RSpec.describe Appearance, type: :model do RSpec.describe Appearance, type: :model do
subject { create(:appearance) } subject { build(:appearance) }
it { is_expected.to be_valid } it { is_expected.to be_valid }
......
require 'spec_helper' require 'spec_helper'
describe DeployKey, models: true do describe DeployKey, models: true do
let(:project) { create(:project) }
let(:deploy_key) { create(:deploy_key, projects: [project]) }
describe "Associations" do describe "Associations" do
it { is_expected.to have_many(:deploy_keys_projects) } it { is_expected.to have_many(:deploy_keys_projects) }
it { is_expected.to have_many(:projects) } it { is_expected.to have_many(:projects) }
......
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