Fix missing Cloudinary tags and misc specs (#486)
This commit is contained in:
parent
0755a07713
commit
5a59b4c8a9
4 changed files with 87 additions and 10 deletions
|
|
@ -75,12 +75,6 @@ class ChatChannelsController < ApplicationController
|
|||
render "index.json"
|
||||
end
|
||||
|
||||
def render_additional_json_response
|
||||
@chat_channels_memberships = current_user.
|
||||
chat_channel_memberships.includes(:chat_channel).limit(200).order("updated_at DESC")
|
||||
render "index.json"
|
||||
end
|
||||
|
||||
def render_channels_html
|
||||
return unless current_user
|
||||
if params[:slug]
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<div class="event">
|
||||
<div class="event-image">
|
||||
<img src="<%= event.cover_image %>">
|
||||
<img src="<%= cloudinary event.cover_image, 500 %>">
|
||||
</div>
|
||||
<div class="event-details" >
|
||||
<h3><a href="/events/<%= event.slug %>"><%= event.category %>: <%= event.title %></a></h3>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,31 @@
|
|||
|
||||
<!-- <p id="notice"><%#= notice %></p> -->
|
||||
|
||||
<style>
|
||||
h2{
|
||||
text-align: center;
|
||||
font-size:2.5em !important;
|
||||
font-weight: 900 !important;
|
||||
}
|
||||
.about-row{
|
||||
width: 500px;
|
||||
max-width: 93%;
|
||||
margin: 50px auto;
|
||||
text-align: center;
|
||||
}
|
||||
.about-key {
|
||||
margin: 10px 0px 30px;
|
||||
}
|
||||
.about-key img {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
border-radius: 1000px;
|
||||
}
|
||||
.about-value {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<header>
|
||||
<div class="blank-space"></div>
|
||||
</header>
|
||||
|
|
@ -37,8 +62,39 @@
|
|||
Where programmers share ideas and help each other grow. It is an online community for sharing and discovering great ideas, having debates, and making friends. Anyone can share articles, questions, discussions, etc. as long as they have the rights to the words they are sharing. Cross-posting from your own blog is welcome.
|
||||
</p>
|
||||
<h2>Leadership</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<div class="about-rows">
|
||||
<div class="about-row">
|
||||
<div class="about-key">
|
||||
<img src="<%= cloudinary "https://thepracticaldev.s3.amazonaws.com/i/b22fx2whfnyfmm05p856.jpeg" %>" width="250" alt="Ben Halpern"/>
|
||||
</div>
|
||||
<div class="about-value">
|
||||
<b>Ben Halpern, Founder</b><br/>
|
||||
Ben manages content, is the core maintainer of the dev.to application, and makes jokes on the Internets.
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-row">
|
||||
<div class="about-key">
|
||||
<img src="<%= cloudinary "https://thepracticaldev.s3.amazonaws.com/i/4zs6ltsogedmp1l46cmi.jpg" %>" width="250" alt="Ben Halpern"/>
|
||||
</div>
|
||||
<div class="about-value">
|
||||
<b>Jess Lee, Co-Founder</b><br/>
|
||||
Jess leads day-to-day operations, manages content, and contributes to the dev.to codebase.
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-row">
|
||||
<div class="about-key">
|
||||
<img src="<%= cloudinary "https://thepracticaldev.s3.amazonaws.com/i/pm1d5npekd2j6ts2hcte.jpeg" %>" width="250" alt="Ben Halpern"/>
|
||||
</div>
|
||||
<div class="about-value">
|
||||
<b>Peter Frank, Co-Founder</b><br/>
|
||||
Peter focuses on strategy, investor relations, and sending dev.to swag around the globe.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
<td><img src="https://thepracticaldev.s3.amazonaws.com/i/b22fx2whfnyfmm05p856.jpeg" width="250" alt="Ben Halpern"/></td>
|
||||
<td>
|
||||
<b>Ben Halpern, Founder</b><br/>
|
||||
|
|
@ -59,7 +115,7 @@
|
|||
Peter focuses on strategy, investor relations, and sending dev.to swag around the globe.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>-->
|
||||
<p>
|
||||
The platform was created in 2016. The Twitter account, <a href="https://twitter.com/thepracticaldev">@ThePracticalDev</a> was around before then. We are based out of New York City.
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ RSpec.describe "ChatChannels", type: :request do
|
|||
let(:user) { create(:user) }
|
||||
let(:test_subject) { create(:user) }
|
||||
let(:chat_channel) { create(:chat_channel) }
|
||||
let(:invite_channel) { create(:chat_channel, channel_type: "invite_only") }
|
||||
let(:direct_channel) { create(:chat_channel, channel_type: "direct", slug: "hello/#{user.username}") }
|
||||
|
||||
before do
|
||||
sign_in user
|
||||
|
|
@ -20,6 +22,31 @@ RSpec.describe "ChatChannels", type: :request do
|
|||
expect(response.body).to include("DEV Connect is Beta ")
|
||||
end
|
||||
end
|
||||
|
||||
context "logged in, visiting existing channel" do
|
||||
before do
|
||||
invite_channel.add_users [user]
|
||||
sign_in user
|
||||
get "/connect/#{invite_channel.slug}"
|
||||
end
|
||||
|
||||
it "has proper content" do
|
||||
expect(response.body).to include("DEV Connect is Beta ")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "get /chat_channels?state=unopened" do
|
||||
it "returns unopened channels" do
|
||||
direct_channel.add_users [user]
|
||||
user.chat_channel_memberships.each do |m|
|
||||
m.has_unopened_messages = true
|
||||
m.save
|
||||
end
|
||||
sign_in user
|
||||
get "/chat_channels?state=unopened"
|
||||
expect(response.body).to include(direct_channel.slug)
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET /chat_channels/:id" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue