Sha256: 5a012c390fe39d87455da310233e7f3b5eea0881cf281707be9a16e6f294b5ee
Contents?: true
Size: 873 Bytes
Versions: 28
Compression:
Stored size: 873 Bytes
Contents
require 'spec_helper' describe DiscourseApi::API::PrivateMessages do subject { DiscourseApi::Client.new("http://localhost:3000", "test_d7fd0429940", "test_user") } describe "#private_messages" do before do stub_get("http://localhost:3000/topics/private-messages/test_user.json?api_key=test_d7fd0429940&api_username=test_user").to_return(body: fixture("private_messages.json"), headers: { content_type: "application/json" }) end it "requests the correct resource" do subject.private_messages('test_user') expect(a_get("http://localhost:3000/topics/private-messages/test_user.json?api_key=test_d7fd0429940&api_username=test_user")).to have_been_made end it "returns the requested private messages" do private_messages = subject.private_messages('test_user') expect(private_messages).to be_an Array end end end
Version data entries
28 entries across 28 versions & 1 rubygems