Skip to content

Commit 826cb2f

Browse files
committed
fix stub
1 parent 9463af9 commit 826cb2f

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎fasp_data_sharing/test/models/fasp_data_sharing/activity_pub_object_test.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ActivityPubObjectTest < ActiveSupport::TestCase
5050
"id" => uri
5151
}
5252
activity_pub_object = ActivityPubObject.new(uri: uri)
53-
message_signatures_stub = stub_request(:get, @uri)
53+
message_signatures_stub = stub_request(:get, uri)
5454
.with { |r| r.headers["Signature-Input"].present? }
5555
.to_return_json(
5656
body: json_object,
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Configure Rails Environment
22
ENV["RAILS_ENV"] = "test"
33

4+
require "webmock"
5+
require "httpx/adapters/webmock"
6+
require "webmock/minitest"
7+
WebMock.disable_net_connect!(
8+
allow_localhost: true
9+
)
10+
411
require_relative "../test/dummy/config/environment"
512
ActiveRecord::Migrator.migrations_paths = [ File.expand_path("../test/dummy/db/migrate", __dir__) ]
613
ActiveRecord::Migrator.migrations_paths << File.expand_path("../db/migrate", __dir__)
@@ -14,11 +21,5 @@
1421
ActiveSupport::TestCase.fixtures :all
1522
end
1623

17-
require "webmock"
18-
require "httpx/adapters/webmock"
19-
require "webmock/minitest"
20-
WebMock.disable_net_connect!(
21-
allow_localhost: true
22-
)
2324

2425
Dir[File.expand_path("support/**/*.rb", __dir__)].each { |f| require f }

0 commit comments

Comments
 (0)