Sha256: 95dab6262778f2fec9c2758dcbf25cb074974397f3e062436c1989c05798eb0d

Contents?: true

Size: 511 Bytes

Versions: 5

Compression:

Stored size: 511 Bytes

Contents

require 'spec_helper'

describe DiscourseApi::API::SSO do
  subject { DiscourseApi::Client.new("#{host}", "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

5 entries across 5 versions & 1 rubygems

Version Path
discourse_api-0.39.3 spec/discourse_api/api/sso_spec.rb
discourse_api-0.39.2 spec/discourse_api/api/sso_spec.rb
discourse_api-0.39.1 spec/discourse_api/api/sso_spec.rb
discourse_api-0.39.0 spec/discourse_api/api/sso_spec.rb
discourse_api-0.38.0 spec/discourse_api/api/sso_spec.rb