Sha256: 43271a24b7746d24bcb0aebb3145a709581e92a9efcc59879b4e914b9c67dc28

Contents?: true

Size: 908 Bytes

Versions: 9

Compression:

Stored size: 908 Bytes

Contents

require 'spec_helper.rb'

describe SafetyPin::JCR do
  before(:all) do
    SafetyPin::JCR.logout
  end
  
  after(:all) do
    SafetyPin::JCR.dev_login
  end
  
  it "should login to a remote JCR" do
    SafetyPin::JCR.login(:hostname => "http://localhost:4502", :username => "admin", :password => "admin")
    SafetyPin::JCR.session.should be_a(Java::JavaxJcr::Session)
    SafetyPin::JCR.should be_logged_in
    SafetyPin::JCR.logout
  end
  
  it "should logout of a remote SafetyPin::JCR" do
    SafetyPin::JCR.login(:hostname => "http://localhost:4502", :username => "admin", :password => "admin")
    SafetyPin::JCR.logout
    SafetyPin::JCR.should be_logged_out
  end
  
  context ".parse_hostname" do
    it "ensures the hostname ends with /crx/server" do
      hostname = SafetyPin::JCR.parse_hostname("http://localhost:4502")
      hostname.end_with?("/crx/server").should be_true
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
safety-pin-0.1.3 spec/jcr_spec.rb
safety-pin-0.1.2 spec/jcr_spec.rb
safety-pin-0.1.1 spec/jcr_spec.rb
safety-pin-0.1.0 spec/jcr_spec.rb
safety-pin-0.0.9 spec/jcr_spec.rb
safety_pin-0.0.8 spec/jcr_spec.rb
safety_pin-0.0.7 spec/jcr_spec.rb
safety_pin-0.0.6 spec/jcr_spec.rb
safety_pin-0.0.5 spec/jcr_spec.rb