Sha256: c273a8a31d3919655614214efca4ec1c730eb3d99f958f76b49de5fb48ecd069

Contents?: true

Size: 809 Bytes

Versions: 8

Compression:

Stored size: 809 Bytes

Contents

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

describe "RhosyncApiReset" do
  it_should_behave_like "ApiHelper"
  
  it "should reset and re-create admin user with bootstrap" do
    Store.put_data('somedoc',{'foo'=>'bar'})
    post "/api/reset", :api_token => @api_token
    App.is_exist?(@test_app_name).should == true
    Store.get_data('somedoc').should == {}
    User.authenticate('admin','').should_not be_nil
  end
  
  it "should reset and re-create admin user with initializer" do
    Store.put_data('somedoc',{'foo'=>'bar'})
    post "/api/reset", :api_token => @api_token
    App.is_exist?(@test_app_name).should == true
    Store.get_data('somedoc').should == {}
    User.authenticate('admin','').should_not be_nil
    load File.join(Rhosync.base_directory,@test_app_name+'.rb')
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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