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