mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Merge branch 'master' into may-11
This commit is contained in:
commit
89bcceeeb2
@ -1,4 +1,4 @@
|
||||
= Notebook.ai
|
||||
= Notebook.ai
|
||||
{<img src="https://travis-ci.org/indentlabs/notebook.png?branch=master" alt="Build Status" />}[https://travis-ci.org/indentlabs/notebook]
|
||||
{<img src="https://codeclimate.com/github/indentlabs/notebook/badges/gpa.svg" />}[https://codeclimate.com/github/indentlabs/notebook]
|
||||
{<img src="https://codeclimate.com/github/indentlabs/notebook/badges/coverage.svg" />}[https://codeclimate.com/github/indentlabs/notebook/coverage]
|
||||
|
||||
@ -49,7 +49,7 @@ class Universe < ApplicationRecord
|
||||
|
||||
has_many :contributors, dependent: :destroy
|
||||
|
||||
scope :in_universe, ->(universe = nil) { where(universe: self) unless universe.nil? }
|
||||
scope :in_universe, ->(universe = nil) { where(id: universe.try(:id)) unless universe.nil? }
|
||||
|
||||
after_destroy do
|
||||
Rails.application.config.content_types[:all_non_universe].each do |content_type|
|
||||
|
||||
@ -144,7 +144,7 @@ RSpec.describe SubscriptionsController, type: :controller do
|
||||
)
|
||||
|
||||
expect(@user.selected_billing_plan_id).to eq(@free_plan.id)
|
||||
expect(@user.active_billing_plans).to eq([@free_plan])
|
||||
expect(@user.active_billing_plans).not_to eq([@premium_plan])
|
||||
|
||||
post :change, params: { stripe_plan_id: 'premium' }
|
||||
|
||||
@ -155,7 +155,7 @@ RSpec.describe SubscriptionsController, type: :controller do
|
||||
|
||||
describe "Starter Permissions" do
|
||||
before do
|
||||
@user.update(selected_billing_plan_id: @premium_plan.id)
|
||||
@user.update(selected_billing_plan_id: @free_plan.id)
|
||||
end
|
||||
|
||||
it "allows Starter users to create core content types" do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user