Adjust specs for web app metadata fetching
This commit is contained in:
parent
92310d434a
commit
0c1b1b4afe
@ -2,8 +2,13 @@ require 'rails_helper'
|
|||||||
|
|
||||||
RSpec.describe RemoteStorageExpireAuthorizationJob, type: :job do
|
RSpec.describe RemoteStorageExpireAuthorizationJob, type: :job do
|
||||||
before do
|
before do
|
||||||
|
allow_any_instance_of(AppCatalog::WebApp).to(
|
||||||
|
receive(:update_metadata).and_return(true)
|
||||||
|
)
|
||||||
|
|
||||||
@user = create :user, cn: "ronald", ou: "kosmos.org"
|
@user = create :user, cn: "ronald", ou: "kosmos.org"
|
||||||
@rs_authorization = create :remote_storage_authorization, user: @user, expire_at: 1.day.ago
|
@rs_authorization = create :remote_storage_authorization,
|
||||||
|
user: @user, expire_at: 1.day.ago
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
|
@ -5,6 +5,10 @@ RSpec.describe RemoteStorageAuthorization, type: :model do
|
|||||||
|
|
||||||
let(:user) { create :user }
|
let(:user) { create :user }
|
||||||
|
|
||||||
|
before do
|
||||||
|
allow_any_instance_of(AppCatalog::WebApp).to receive(:update_metadata).and_return(true)
|
||||||
|
end
|
||||||
|
|
||||||
describe "#create" do
|
describe "#create" do
|
||||||
after(:each) { clear_enqueued_jobs }
|
after(:each) { clear_enqueued_jobs }
|
||||||
after(:all) { redis_rs_delete_keys("authorizations:*") }
|
after(:all) { redis_rs_delete_keys("authorizations:*") }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user