Sha256: 304bc2ee1c1ebee8705d07e1e0cfa6e41247d3e716813a4fecb8a81b0679fbd6

Contents?: true

Size: 1007 Bytes

Versions: 1

Compression:

Stored size: 1007 Bytes

Contents

require 'spec_helper'

describe DiscourseApi::API::Users do
  subject { DiscourseApi::Client.new("http://localhost") }

  describe "#toggle_avatar" do
    it "needs to have a test written for it"
  end

  describe "#user" do
    before do
      stub_get("http://localhost/user/test_user.json").to_return(body: fixture("user.json"), headers: { content_type: "application/json" })
    end

    it "requests the correct resource" do
      subject.user("test_user")
      expect(a_get("http://localhost/user/test_user.json")).to have_been_made
    end

    it "returns the requested user" do
      user = subject.user("test_user")
      expect(user).to be_a Hash
    end
  end

  describe "#update_avatar" do
    it "needs to have a test written for it"
  end

  describe "#update_email" do
    it "needs to have a test written for it"
  end

  describe "#update_user" do
    it "needs to have a test written for it"
  end

  describe "#update_username" do
    it "needs to have a test written for it"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
discourse_api-0.1.1 spec/discourse_api/api/users_spec.rb