Add deploy_key and personal_key factories
This commit is contained in:
parent
c9c1f76e00
commit
0bc9094058
2 changed files with 16 additions and 0 deletions
|
@ -76,6 +76,14 @@ FactoryGirl.define do
|
||||||
factory :key do
|
factory :key do
|
||||||
title
|
title
|
||||||
key { File.read(File.join(Rails.root, "db", "pkey.example")) }
|
key { File.read(File.join(Rails.root, "db", "pkey.example")) }
|
||||||
|
|
||||||
|
factory :deploy_key do
|
||||||
|
project
|
||||||
|
end
|
||||||
|
|
||||||
|
factory :personal_key do
|
||||||
|
user
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :milestone do
|
factory :milestone do
|
||||||
|
|
|
@ -49,6 +49,14 @@ describe "Factories" do
|
||||||
it "builds a valid instance" do
|
it "builds a valid instance" do
|
||||||
build(:key).should be_valid
|
build(:key).should be_valid
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "builds a valid deploy key instance" do
|
||||||
|
build(:deploy_key).should be_valid
|
||||||
|
end
|
||||||
|
|
||||||
|
it "builds a valid personal key instance" do
|
||||||
|
build(:personal_key).should be_valid
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'Milestone' do
|
describe 'Milestone' do
|
||||||
|
|
Loading…
Reference in a new issue