-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #487 from coopdevs/develop
Release 1.13.0
- Loading branch information
Showing
15 changed files
with
134 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddIsGroupToPost < ActiveRecord::Migration | ||
def change | ||
add_column :posts, :is_group, :boolean, default: false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe 'inquiries/show' do | ||
let(:organization) { Fabricate(:organization) } | ||
let(:member) { Fabricate(:member, organization: organization) } | ||
let(:inquiry) { Fabricate(:inquiry, user: member.user, organization: organization) } | ||
let(:group_inquiry) { Fabricate(:inquiry, user: member.user, organization: organization, is_group: true) } | ||
let(:destination_account) { Fabricate(:account) } | ||
|
||
|
||
context 'when the user is not logged in' do | ||
before do | ||
allow(view).to receive(:current_user).and_return(nil) | ||
allow(view).to receive(:current_organization).and_return(nil) | ||
end | ||
|
||
context 'when it is not a group inquiry' do | ||
it 'displays a label' do | ||
assign :inquiry, inquiry | ||
assign :destination_account, destination_account | ||
render template: 'inquiries/show' | ||
|
||
expect(rendered).to_not include(I18n.t('activerecord.attributes.inquiry.is_group')) | ||
end | ||
end | ||
|
||
context 'when it is a group inquiry' do | ||
it 'displays a label' do | ||
assign :inquiry, group_inquiry | ||
assign :destination_account, destination_account | ||
render template: 'inquiries/show' | ||
|
||
expect(rendered).to include(I18n.t('activerecord.attributes.inquiry.is_group')) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters