Commit 0bc90940 authored by Robert Speicher's avatar Robert Speicher

Add deploy_key and personal_key factories

parent c9c1f76e
...@@ -76,6 +76,14 @@ FactoryGirl.define do ...@@ -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 ...@@ -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
......
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