Dne 27.10.2010 19:46, Jason Guiditta napsal(a):
> On Wed, 2010-10-27 at 15:18 +0200, [email protected] wrote:
>> From: Jan Provaznik<[email protected]>
>>
>> ---
>>   src/spec/controllers/instance_controller.rb |   41 
>> +++++++++++++++++++++++++++
>>   1 files changed, 41 insertions(+), 0 deletions(-)
>>   create mode 100644 src/spec/controllers/instance_controller.rb
>>
> Two minor nits, then ACK.  First,this file should be named
> instance_controller_spec.rb to keep consistency.  2nd is inline.
>
>> diff --git a/src/spec/controllers/instance_controller.rb 
>> b/src/spec/controllers/instance_controller.rb
>> new file mode 100644
>> index 0000000..b474518
>> --- /dev/null
>> +++ b/src/spec/controllers/instance_controller.rb
>> @@ -0,0 +1,41 @@
>> +require 'spec_helper'
>> +
>> +describe InstanceController do
>> +  fixtures :all
>> +  before(:each) do
>> +    @admin_permission = Factory :admin_permission
>> +    @admin = @admin_permission.user
>> +    activate_authlogic
>> +  end
>> +
>> +  it "should provide ui to create new instance" do
>> +     UserSession.create(@admin)
>> +     get :new
>> +     response.should be_success
>> +     response.should render_template("new")
>> +  end
>> +
>> +  it "should fail to grant access to new pool ui for unauthenticated user" 
>> do
>> +     get :new
>> +     response.should_not be_success
>> +  end
>> +
>> +  it "should allow admin to launch instance" do
>
> Shouldn't the above be 'allow instance creator to launch instance',
> rather than admin, since that is the user the test is verifying?
>

Both fixed and pushed. Thanks.

Jan
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to