Skip to content

Commit

Permalink
added test for access with default credentials shinesolutions#8
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim Hussein committed Jan 25, 2018
1 parent bfe4d35 commit c19807e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion security/author_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
describe 'Author', type: :feature do
before :each do
@conf = read_config
@aem_author = init_author_client(@conf['aem']['author'])
end

it 'should not be able to login using default admin password' do
# use aem api calls
aem = @aem_author.aem
begin
aem.get_agents('author')
rescue RubyAem::Error => error
# response should be unauthorized
expect(error.result.response.status_code).to eq(401)
end
end

end
10 changes: 9 additions & 1 deletion security/publish_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
describe 'Publish', type: :feature do
before :each do
@conf = read_config
@aem_publish = init_publish_client(@conf['aem']['publish'])
end

it 'should not be able to login using default admin password' do
# use aem api calls
aem = @aem_publish.aem
begin
aem.get_agents('publish')
rescue RubyAem::Error => error
# response should be unauthorized
expect(error.result.response.status_code).to eq(401)
end
end

end

0 comments on commit c19807e

Please sign in to comment.