Sha256: 5c170452dab5b9f575847312041acbcc159cc1d51238a72fafa27433419b80c9

Contents?: true

Size: 852 Bytes

Versions: 38

Compression:

Stored size: 852 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_outcome.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_outcome.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

38 entries across 38 versions & 1 rubygems

Version Path
bearcat-1.5.13 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.12 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.11 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.10 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.9 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.8 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.7 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.6 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.5 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.4 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.3 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.2 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.0 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.0.beta4 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.0.beta3 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.0.beta2 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.5.0.beta1 spec/bearcat/client/learning_outcomes_spec.rb
bearcat-1.4.13 spec/bearcat/client/learning_outcomes_spec.rb