Skip to content

Commit

Permalink
Merge pull request #458 from concord-consortium/fix-wrapping-plugins
Browse files Browse the repository at this point in the history
fix wrapping plugins
  • Loading branch information
scytacki authored Aug 7, 2019
2 parents c714248 + 13f4194 commit 203394f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/embeddable/embeddable_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.table_name
attr_accessible :plugin, :approved_script_id, :description, :author_data,
:is_full_width, :is_hidden, :component_label

has_one :plugin, as: :plugin_scope
has_one :plugin, as: :plugin_scope, autosave: true

has_many :page_items, :as => :embeddable, :dependent => :destroy
has_many :interactive_pages, :through => :page_items
Expand Down
10 changes: 10 additions & 0 deletions spec/models/embeddable/embeddable_plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,14 @@
end

end

describe 'delegated to plugin methods' do
it 'should save value after a simple create, set, save, reload' do
embeddable = Embeddable::EmbeddablePlugin.create!
embeddable.approved_script_id = "123"
embeddable.save!
embeddable.reload
expect(embeddable.approved_script_id).to eq("123")
end
end
end

0 comments on commit 203394f

Please sign in to comment.