Sha256: 43f9bf0724df7c742d622c3facdf40ac54a2f0de96d8b694e5e995d2dcb2ce1b

Contents?: true

Size: 551 Bytes

Versions: 42

Compression:

Stored size: 551 Bytes

Contents

require 'helper'

describe Bearcat::Client::Discussions do
  before do
    @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
  end

  it "creates a new group discussion" do
    title = "This is a group discussion"
    stub_post(@client, "/api/v1/groups/2/discussion_topics").with(body: {"title" => title}).to_return(json_response("create_group_discussion.json"))
    discussion = @client.create_group_discussion(2, {'title' => title})
    discussion['title'].should == 'This is a group discussion'
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
bearcat-1.2.5 spec/bearcat/client/discussions_spec.rb
bearcat-1.2.4 spec/bearcat/client/discussions_spec.rb
bearcat-1.2.3 spec/bearcat/client/discussions_spec.rb
bearcat-1.2.1 spec/bearcat/client/discussions_spec.rb
bearcat-1.2.0 spec/bearcat/client/discussions_spec.rb
bearcat-1.1.1 spec/bearcat/client/discussions_spec.rb
bearcat-1.1.0 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.28 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.27 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.26 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.25 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.24 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.23 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.22 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.21 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.20 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.19 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.18 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.17 spec/bearcat/client/discussions_spec.rb
bearcat-1.0.16 spec/bearcat/client/discussions_spec.rb