Skip to content

Commit

Permalink
fix coverage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Oct 17, 2024
1 parent 5a2d2f2 commit 2be03cf
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 56 deletions.
112 changes: 56 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,68 +8,68 @@ GIT
GEM
remote: http://rubygems.org/
specs:
actioncable (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
actioncable (6.1.7.9)
actionpack (= 6.1.7.9)
activesupport (= 6.1.7.9)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
actionmailbox (6.1.7.9)
actionpack (= 6.1.7.9)
activejob (= 6.1.7.9)
activerecord (= 6.1.7.9)
activestorage (= 6.1.7.9)
activesupport (= 6.1.7.9)
mail (>= 2.7.1)
actionmailer (6.1.7.8)
actionpack (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activesupport (= 6.1.7.8)
actionmailer (6.1.7.9)
actionpack (= 6.1.7.9)
actionview (= 6.1.7.9)
activejob (= 6.1.7.9)
activesupport (= 6.1.7.9)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.8)
actionview (= 6.1.7.8)
activesupport (= 6.1.7.8)
actionpack (6.1.7.9)
actionview (= 6.1.7.9)
activesupport (= 6.1.7.9)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.8)
actionpack (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
actiontext (6.1.7.9)
actionpack (= 6.1.7.9)
activerecord (= 6.1.7.9)
activestorage (= 6.1.7.9)
activesupport (= 6.1.7.9)
nokogiri (>= 1.8.5)
actionview (6.1.7.8)
activesupport (= 6.1.7.8)
actionview (6.1.7.9)
activesupport (= 6.1.7.9)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.7.8)
activesupport (= 6.1.7.8)
activejob (6.1.7.9)
activesupport (= 6.1.7.9)
globalid (>= 0.3.6)
activemodel (6.1.7.8)
activesupport (= 6.1.7.8)
activemodel (6.1.7.9)
activesupport (= 6.1.7.9)
activemodel-serializers-xml (1.0.3)
activemodel (>= 5.0.0.a)
activesupport (>= 5.0.0.a)
builder (~> 3.1)
activerecord (6.1.7.8)
activemodel (= 6.1.7.8)
activesupport (= 6.1.7.8)
activerecord (6.1.7.9)
activemodel (= 6.1.7.9)
activesupport (= 6.1.7.9)
activeresource (6.1.3)
activemodel (>= 6.0)
activemodel-serializers-xml (~> 1.0)
activesupport (>= 6.0)
activestorage (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activesupport (= 6.1.7.8)
activestorage (6.1.7.9)
actionpack (= 6.1.7.9)
activejob (= 6.1.7.9)
activerecord (= 6.1.7.9)
activesupport (= 6.1.7.9)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.8)
activesupport (6.1.7.9)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -82,7 +82,7 @@ GEM
ansi (1.5.0)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.989.0)
aws-partitions (1.991.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
Expand Down Expand Up @@ -271,20 +271,20 @@ GEM
rack
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.8)
actioncable (= 6.1.7.8)
actionmailbox (= 6.1.7.8)
actionmailer (= 6.1.7.8)
actionpack (= 6.1.7.8)
actiontext (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activemodel (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
rails (6.1.7.9)
actioncable (= 6.1.7.9)
actionmailbox (= 6.1.7.9)
actionmailer (= 6.1.7.9)
actionpack (= 6.1.7.9)
actiontext (= 6.1.7.9)
actionview (= 6.1.7.9)
activejob (= 6.1.7.9)
activemodel (= 6.1.7.9)
activerecord (= 6.1.7.9)
activestorage (= 6.1.7.9)
activesupport (= 6.1.7.9)
bundler (>= 1.15.0)
railties (= 6.1.7.8)
railties (= 6.1.7.9)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
Expand All @@ -293,9 +293,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
railties (6.1.7.9)
actionpack (= 6.1.7.9)
activesupport (= 6.1.7.9)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -334,7 +334,7 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.66.1)
rubocop (1.67.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -373,7 +373,7 @@ GEM
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
sshkit (1.23.1)
sshkit (1.23.2)
base64
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
Expand Down
7 changes: 7 additions & 0 deletions spec/controllers/collection_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
expect(response.status).to eq(201)
end

it 'fileid search with wildcard - no results' do
mock_permissions_all(user_id, collection_id)
request.session.merge!({ uid: user_id })
get(:local_id_search, params: { group: @collection.group, terms: 'my-local-id-n*t-found' })
expect(response.status).to eq(201)
end

it 'localid search - result found' do
mock_permissions_all(user_id, collection_id)
request.session.merge!({ uid: user_id })
Expand Down
8 changes: 8 additions & 0 deletions spec/controllers/owner_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ def mock_owner_name(name)
expect(response.status).to eq(201)
end

it 'fileid search with wildcard - no results' do
mock_permissions_all(user_id, collection_id)
mock_owner_name(@owner.name)
request.session.merge!({ uid: user_id })
get(:search_results, params: { terms: 'my-local-id-n*t-found', owner: @owner.name })
expect(response.status).to eq(201)
end

it 'empty terms search no results' do
mock_permissions_all(user_id, collection_id)
mock_owner_name(@owner.name)
Expand Down

0 comments on commit 2be03cf

Please sign in to comment.