Sha256: 9a5a6a385e1ed93b147637cc5ff5fbff457a89f002550d7afad48b064ebf0e4f

Contents?: true

Size: 679 Bytes

Versions: 31

Compression:

Stored size: 679 Bytes

Contents

require File.join(File.dirname(__FILE__),'api_helper')

describe "RhosyncApiDeleteUser" do
  it_should_behave_like "ApiHelper"
  
  it "should delete user" do
    params = {:api_token => @api_token,
      :attributes => {:login => 'testuser1', :password => 'testpass1'}}
    post "/api/create_user", params
    last_response.should be_ok
    User.is_exist?(params[:attributes][:login]).should == true
    post "/api/delete_user", {:api_token => @api_token, 
      :user_id => params[:attributes][:login]}  
      last_response.should be_ok
    User.is_exist?(params[:attributes][:login]).should == false
    App.load(@test_app_name).users.members.should == ["testuser"]
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
rhosync-2.1.7 spec/api/delete_user_spec.rb
rhosync-2.1.6 spec/api/delete_user_spec.rb
rhosync-2.1.3 spec/api/delete_user_spec.rb
rhosync-2.1.2 spec/api/delete_user_spec.rb
rhosync-2.1.1 spec/api/delete_user_spec.rb
rhosync-2.1.0 spec/api/delete_user_spec.rb
rhosync-2.1.0.beta.2 spec/api/delete_user_spec.rb
rhosync-2.1.0.beta.1 spec/api/delete_user_spec.rb
rhosync-2.0.9 spec/api/delete_user_spec.rb
rhosync-2.0.8 spec/api/delete_user_spec.rb
rhosync-2.0.7 spec/api/delete_user_spec.rb
rhosync-2.0.6 spec/api/delete_user_spec.rb
rhosync-2.0.5 spec/api/delete_user_spec.rb
rhosync-2.0.4 spec/api/delete_user_spec.rb
rhosync-2.0.3 spec/api/delete_user_spec.rb
rhosync-2.0.2 spec/api/delete_user_spec.rb
rhosync-2.0.1 spec/api/delete_user_spec.rb
rhosync-2.0.0 spec/api/delete_user_spec.rb
rhosync-2.0.0.rc2 spec/api/delete_user_spec.rb
rhosync-2.0.0.rc1 spec/api/delete_user_spec.rb