Sha256: 240ee0bfb93af44841d2392673f3c74fad537d462c74726b339a2704a09f2342

Contents?: true

Size: 652 Bytes

Versions: 7

Compression:

Stored size: 652 Bytes

Contents

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

describe "RhosyncApiCreateUser" do
  it_should_behave_like "ApiHelper"
  
  it "should create user as admin" do
    params = {:api_token => @api_token,
      :attributes => {:login => 'testuser1', :password => 'testpass1'}}
    post "/api/create_user", params
    last_response.should be_ok
    User.load(params[:attributes][:login]).login.should == params[:attributes][:login]
    User.authenticate(params[:attributes][:login],
      params[:attributes][:password]).login.should == params[:attributes][:login]
    @a.users.members.sort.should == [@u.login, params[:attributes][:login]]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rhosync-2.0.0.beta9 spec/api/create_user_spec.rb
rhosync-2.0.0.beta8 spec/api/create_user_spec.rb
rhosync-2.0.0.beta7 spec/api/create_user_spec.rb
rhosync-2.0.0.beta6 spec/api/create_user_spec.rb
rhosync-2.0.0.beta4 spec/api/create_user_spec.rb
rhosync-2.0.0.beta3 spec/api/create_user_spec.rb
rhosync-2.0.0.beta2 spec/api/create_user_spec.rb