Sha256: eb4742686033d2e5d7c47e7210313b5367ac4d709509c5e5a608909e1ae1b2af

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

# frozen_string_literal: true

require 'helper'

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

  it "returns an individual learning outcome" do
    stub_get(@client, "/api/v1/outcomes/1").to_return(json_response("learning_outcomes.json"))
    outcome = @client.learning_outcome(1)
    outcome["id"].should == 1
    outcome["context_type"].should == "Course"
    outcome["title"].should == "First Outcome"
  end

  it "updates an individual learning outcome" do
    stub_put(@client, "/api/v1/outcomes/1").to_return(json_response("learning_outcomes.json"))
    outcome = @client.update_learning_outcome(1)
    outcome["id"].should == 1
    outcome["context_type"].should == "Course"
    outcome["title"].should == "First Outcome"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bearcat-1.4.12 spec/bearcat/client/learning_outcomes_spec.rb