Specs for deploy_keys updated

This commit is contained in:
miks 2011-12-31 19:37:51 +02:00
parent b8b6515f93
commit df583bf12d
5 changed files with 6 additions and 50 deletions

View file

@ -1,29 +0,0 @@
require 'spec_helper'
describe DeployKey do
describe "Associations" do
it { should belong_to(:project) }
end
describe "Validation" do
it { should validate_presence_of(:title) }
it { should validate_presence_of(:key) }
end
it { Factory.create(:deploy_key,
:project => Factory(:project)).should be_valid }
end
# == Schema Information
#
# Table name: deploy_keys
#
# id :integer not null, primary key
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# key :text
# title :string(255)
# identifier :string(255)
#

View file

@ -2,7 +2,7 @@ require 'spec_helper'
describe Key do
describe "Associations" do
it { should belong_to(:user) }
it { should belong_to(:user) or belong_to(:project) }
end
describe "Validation" do