Sha256: a4a20120b8bd31c1db505174eb9ef1feff5cd087a384b773ccd4b8cc37b9a596
Contents?: true
Size: 690 Bytes
Versions: 5
Compression:
Stored size: 690 Bytes
Contents
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
5 entries across 5 versions & 1 rubygems