Sha256: 31ad289837fea9c79405a334ac4254482451b2f8fbaf24894791fc4439d5ea74

Contents?: true

Size: 889 Bytes

Versions: 15

Compression:

Stored size: 889 Bytes

Contents

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

describe "RhoconnectApiReset" do
  include_examples "ApiHelper"

  it "should reset and re-create rhoadmin user with bootstrap" do
    Store.put_data('somedoc',{ '1' => {'foo'=>'bar'}})
    post "/rc/#{Rhoconnect::API_VERSION}/system/reset", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
    App.is_exist?(test_app_name).should == true
    Store.get_data('somedoc').should == {}
    User.authenticate('rhoadmin','').should_not be_nil
  end

  it "should reset and re-create rhoadmin user with initializer" do
    Store.put_data('somedoc',{ '1' => {'foo'=>'bar'}})
    post "/rc/#{Rhoconnect::API_VERSION}/system/reset", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
    App.is_exist?(test_app_name).should == true
    Store.get_data('somedoc').should == {}
    User.authenticate('rhoadmin','').should_not be_nil
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 spec/api/system/reset_spec.rb
rhoconnect-7.5.1 spec/api/system/reset_spec.rb
rhoconnect-7.4.1 spec/api/system/reset_spec.rb
rhoconnect-7.1.17 spec/api/system/reset_spec.rb
rhoconnect-6.2.0 spec/api/system/reset_spec.rb
rhoconnect-6.0.11 spec/api/system/reset_spec.rb
rhoconnect-5.5.18 spec/api/system/reset_spec.rb
rhoconnect-5.5.17 spec/api/system/reset_spec.rb
rhoconnect-5.5.15 spec/api/system/reset_spec.rb
rhoconnect-5.5.0.22 spec/api/system/reset_spec.rb
rhoconnect-5.5.2 spec/api/system/reset_spec.rb
rhoconnect-5.5.0.7 spec/api/system/reset_spec.rb
rhoconnect-5.5.0.3 spec/api/system/reset_spec.rb
rhoconnect-5.5.0 spec/api/system/reset_spec.rb
rhoconnect-5.1.1 spec/api/system/reset_spec.rb