Skip to content

Commit

Permalink
treesame commit of origin/stable/2017-10-07
Browse files Browse the repository at this point in the history
Treesame-Commit-Id: 6f6f0fd
  • Loading branch information
neilgupta committed Oct 7, 2017
3 parents c9f1ba1 + 6f6f0fd + 534f3b5 commit abbb9d8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/canvadoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def has_annotations?
account_context = attachment.context.try(:account)
account_context ||= attachment.context.try(:root_account)
new_annotations_enabled = account_context&.feature_enabled?(:new_annotations)
new_annotations_enabled || annotations == true
new_annotations_enabled || has_annotations == true
end

def self.mime_types
Expand Down
2 changes: 1 addition & 1 deletion app/models/conditional_release/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def self.configured?
end

def self.enabled_in_context?(context)
!!(configured? && context.feature_enabled?(:conditional_release))
!!(configured? && context&.feature_enabled?(:conditional_release))
end

def self.protocol
Expand Down
2 changes: 1 addition & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6749,7 +6749,7 @@ fr:
tabs:
arrows: Flèches
basic: Simple
delimiters: Délimiteurs
delimiters: "Délimiteurs SWmqwuiasuiyjsaq"
greek: Grec
misc: Divers
operators: Opérateurs
Expand Down
12 changes: 12 additions & 0 deletions spec/models/canvadoc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,16 @@ def disable_canvadocs
expect(@doc).not_to be_available
end
end

describe "#has_annotations?" do
it "has annotations when true and new annotations are not enabled" do
@doc.has_annotations = true
expect(@doc).to have_annotations
end

it "does not have annotations when false and new annotations are not enabled" do
@doc.has_annotations = false
expect(@doc).not_to have_annotations
end
end
end

0 comments on commit abbb9d8

Please sign in to comment.