Sha256: 0bc2f35e98c5edcea4a72d29f79074f067146b38e74bc7bff795db2634ba3243
Contents?: true
Size: 720 Bytes
Versions: 14
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe DiscourseApi::API::Backups do subject { DiscourseApi::Client.new("#{host}", "test_d7fd0429940", "test_user") } describe "#backups" do before do stub_get("#{host}/admin/backups.json").to_return(body: fixture("backups.json"), headers: { content_type: "application/json" }) end it "requests the correct resource" do subject.backups expect(a_get("#{host}/admin/backups.json")).to have_been_made end it "returns the requested backups" do backups = subject.backups expect(backups).to be_an Array expect(backups.first).to be_a Hash expect(backups.first).to have_key('filename') end end end
Version data entries
14 entries across 14 versions & 1 rubygems