File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 96
96
end
97
97
98
98
context 'when log is archived' do
99
- it 'redirects to archive ' do
99
+ it 'returns the log ' do
100
100
remote = double ( 'remote' )
101
101
remote_log = double ( 'remote log' )
102
102
expect ( remote_log ) . to receive ( :archived? ) . and_return ( true )
103
103
allow ( remote_log ) . to receive ( :removed_at ) . and_return ( nil )
104
+ allow ( remote_log ) . to receive ( :archived_log_content ) . and_return ( archived_content )
104
105
allow ( remote ) . to receive ( :find_by_job_id ) . and_return ( remote_log )
105
- expect ( remote_log ) . to receive ( :archived_url ) . and_return ( "https://s3.amazonaws.com/archive.travis-ci.org/jobs/ #{ job . id } /log.txt" )
106
+ allow ( remote ) . to receive ( :fetch_archived_log_content ) . and_return ( archived_content )
106
107
expect ( Travis ::RemoteLog ::Remote ) . to receive ( :new ) . and_return ( remote )
107
108
stub_request ( :get , "#{ Travis . config . logs_api . url } /logs/#{ job . id } ?by=job_id&source=api" )
108
109
. to_return (
118
119
{ } ,
119
120
{ 'HTTP_ACCEPT' => 'text/plain; version=2' }
120
121
)
121
- expect ( response ) . to redirect_to (
122
- "https://s3.amazonaws.com/archive.travis-ci.org/jobs/#{ job . id } /log.txt"
123
- )
122
+ expect ( response . status ) . to eq ( 200 )
124
123
end
125
124
end
126
125
You can’t perform that action at this time.
0 commit comments