Sha256: 7c0f489da135887fb2ff48302023a13ab7f5a067958e9c43934490883be02300

Contents?: true

Size: 525 Bytes

Versions: 44

Compression:

Stored size: 525 Bytes

Contents

require 'spec_helper'

describe DiscourseApi::API::SSO do
  subject { DiscourseApi::Client.new("http://localhost:3000", "test_d7fd0429940", "test_user" )}

  describe "#sync_sso" do
    before do
      stub_post(/.*sync_sso.*/).to_return(body: fixture("user.json"), headers: { content_type: "application/json" })
    end

    it "requests the correct resource" do
      subject.sync_sso({sso_secret: "test_d7fd0429940", "custom.riffle_url" => "test"})
      expect(a_post(/.*sync_sso.*/)).to have_been_made
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
discourse_api-0.5.1 spec/discourse_api/api/sso_spec.rb
discourse_api-0.5.0 spec/discourse_api/api/sso_spec.rb
discourse_api-0.4.4 spec/discourse_api/api/sso_spec.rb
discourse_api-0.4.3 spec/discourse_api/api/sso_spec.rb