File: read_url_spec.rb

package info (click to toggle)
puppet-module-extlib 7.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 420 kB
  • sloc: ruby: 1,035; sh: 15; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 481 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'spec_helper'

describe 'extlib::read_url' do
  it { is_expected.not_to eq(nil) }
  it { is_expected.to run.with_params.and_raise_error(ArgumentError) }

  context 'when called with a valid url' do
    it 'returns the content of the url' do
      returned_data = subject.execute('https://raw.githubusercontent.com/voxpupuli/puppet-extlib/master/README.md')
      expect(returned_data).to include('Extlib module for Puppet')
    end
  end
end