Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiMysko committed Oct 11, 2022
1 parent c5b2679 commit 4ba8710
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions spec/v3/services/log/find_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@
remote = double('remote')
allow(Travis::RemoteLog::Remote).to receive(:new).and_return(remote)
allow(remote).to receive(:find_by_job_id).and_return(Travis::RemoteLog.new(log_from_api))
repository = Travis::API::V3::Models::Repository.find(repo.id)
repository.user_settings.update(:job_log_time_based_limit, true)
repository.save!
end
after do
Fog.unmock!
Expand Down Expand Up @@ -227,7 +224,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_access_based_limit, false)
end

Expand Down Expand Up @@ -258,7 +255,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_access_based_limit, true)
end

Expand Down Expand Up @@ -316,7 +313,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_access_based_limit, true)
end

Expand Down Expand Up @@ -370,7 +367,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_access_based_limit, false)
end

Expand Down Expand Up @@ -402,7 +399,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_access_based_limit, false)
end

Expand Down Expand Up @@ -438,7 +435,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_access_based_limit, true)
end

Expand Down Expand Up @@ -497,7 +494,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_access_based_limit, true)
end

Expand Down Expand Up @@ -552,7 +549,7 @@
user_settings = Travis::API::V3::Models::Repository.find(repo.id).user_settings
user_settings.user = user
user_settings.change_source = 'travis-api'
user_settings.update(:job_log_time_based_limit, false)
user_settings.update(:job_log_time_based_limit, true)
user_settings.update(:job_log_access_based_limit, false)
end

Expand Down

0 comments on commit 4ba8710

Please sign in to comment.