spec/api/user/show_user_spec.rb in rhoconnect-4.0.4 vs spec/api/user/show_user_spec.rb in rhoconnect-5.1.1

- old
+ new

@@ -1,14 +1,14 @@ require File.join(File.dirname(__FILE__),'..','api_helper') describe "RhoconnectApiShowUser" do - it_should_behave_like "ApiHelper" do - it "should show user" do - params = {:attributes => {:login => 'testuser1', :password => 'testpass1'}} - post "/rc/#{Rhoconnect::API_VERSION}/users", params, {Rhoconnect::API_TOKEN_HEADER => @api_token} - last_response.should be_ok - get "/rc/#{Rhoconnect::API_VERSION}/users/#{params[:attributes][:login]}", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token} - last_response.should be_ok - JSON.parse(last_response.body).should include({"name"=>"login", "value"=>"testuser1", "type"=>"string"}) - end - end + include_examples "ApiHelper" + + it "should show user" do + params = {:attributes => {:login => 'testuser1', :password => 'testpass1'}} + post "/rc/#{Rhoconnect::API_VERSION}/users", params, {Rhoconnect::API_TOKEN_HEADER => @api_token} + last_response.should be_ok + get "/rc/#{Rhoconnect::API_VERSION}/users/#{params[:attributes][:login]}", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token} + last_response.should be_ok + JSON.parse(last_response.body).should include({"name"=>"login", "value"=>"testuser1", "type"=>"string"}) + end end \ No newline at end of file