2012-07-13 12:18:12 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe KeyPair do
|
2012-07-17 10:31:32 +01:00
|
|
|
before(:all) do
|
|
|
|
stub_symlink_methods
|
2012-07-31 17:06:57 +01:00
|
|
|
stub_key_pairs_calls
|
2012-07-17 10:31:32 +01:00
|
|
|
FactoryGirl.create(:key_pair)
|
|
|
|
end
|
|
|
|
|
|
|
|
it { should belong_to(:repository) }
|
|
|
|
it { should belong_to(:user)}
|
|
|
|
|
|
|
|
it { should_not allow_mass_assignment_of(:user) }
|
|
|
|
it { should_not allow_mass_assignment_of(:key_id) }
|
|
|
|
|
|
|
|
after(:all) do
|
|
|
|
Platform.delete_all
|
|
|
|
User.delete_all
|
|
|
|
Product.delete_all
|
|
|
|
FileUtils.rm_rf(APP_CONFIG['root_path'])
|
|
|
|
end
|
2012-07-13 12:18:12 +01:00
|
|
|
end
|