2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-03-11 16:08:41 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Repository do
|
2011-12-08 14:03:56 +00:00
|
|
|
|
|
|
|
context 'when create with same owner that platform' do
|
|
|
|
before (:each) do
|
2011-12-12 07:51:39 +00:00
|
|
|
stub_rsync_methods
|
2011-12-08 14:03:56 +00:00
|
|
|
@platform = Factory(:platform)
|
|
|
|
@params = {:name => 'tst_platform', :description => 'test platform'}
|
|
|
|
end
|
|
|
|
|
2012-02-20 23:13:05 +00:00
|
|
|
it 'it should increase Repository.count by 1' do
|
|
|
|
rep = Repository.create(@params) {|r| r.platform = @platform}
|
|
|
|
@platform.repositories.count.should eql(1)
|
2011-12-08 14:03:56 +00:00
|
|
|
end
|
|
|
|
end
|
2011-03-11 16:08:41 +00:00
|
|
|
end
|