aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/refinery/blog/admin/categories_spec.rb14
-rw-r--r--spec/features/refinery/blog/admin/posts_spec.rb24
2 files changed, 19 insertions, 19 deletions
diff --git a/spec/features/refinery/blog/admin/categories_spec.rb b/spec/features/refinery/blog/admin/categories_spec.rb
index 907c6a0..b3e3f31 100644
--- a/spec/features/refinery/blog/admin/categories_spec.rb
+++ b/spec/features/refinery/blog/admin/categories_spec.rb
@@ -44,10 +44,10 @@ describe "Categories admin", type: :feature do
expect(Refinery::Blog::Category.count).to eq(1)
end
- it "shows locale flag for category" do
+ it "shows locale for category" do
click_link "Manage"
within "#category_#{@c.id}" do
- expect(page).to have_css("img[src='/assets/refinery/icons/flags/en.png']")
+ expect(page).to have_css(".locale_icon.en")
end
end
@@ -73,7 +73,7 @@ describe "Categories admin", type: :feature do
visit refinery.blog_admin_posts_path
click_link "Create new category"
within "#switch_locale_picker" do
- click_link "ru"
+ click_link "RU"
end
fill_in "Title", :with => ru_category_title
click_button "Save"
@@ -85,17 +85,17 @@ describe "Categories admin", type: :feature do
expect(Refinery::Blog::Category.count).to eq(1)
end
- it "shows locale flag for category" do
+ it "shows locale for category" do
click_link "Manage"
within "#category_#{@c.id}" do
- expect(page).to have_css("img[src='/assets/refinery/icons/flags/ru.png']")
+ expect(page).to have_css(".locale_icon.ru")
end
end
- it "does not show locale flag for primary locale" do
+ it "does not show locale for primary locale" do
click_link "Manage"
within "#category_#{@c.id}" do
- expect(page).not_to have_css("img[src='/assets/refinery/icons/flags/en.png']")
+ expect(page).not_to have_css(".locale_icon.en")
end
end
diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb
index 4efbc66..ca45fd3 100644
--- a/spec/features/refinery/blog/admin/posts_spec.rb
+++ b/spec/features/refinery/blog/admin/posts_spec.rb
@@ -208,10 +208,10 @@ module Refinery
expect(Refinery::Blog::Post.count).to eq(1)
end
- it "shows locale flag for post" do
+ it "shows locale for post" do
within "#post_#{@p.id}" do
- expect(page).to have_css("img[src='/assets/refinery/icons/flags/en.png']")
+ expect(page).to have_css(".locale_icon.en")
end
end
@@ -234,7 +234,7 @@ module Refinery
before do
click_link "Create new post"
within "#switch_locale_picker" do
- click_link "ru"
+ click_link "RU"
end
fill_in "Title", :with => ru_page_title
fill_in "post_body", :with => "One post in my blog"
@@ -253,15 +253,15 @@ module Refinery
end
end
- it "shows locale flag for post" do
+ it "shows locale for post" do
within "#post_#{@p.id}" do
- expect(page).to have_css("img[src='/assets/refinery/icons/flags/ru.png']")
+ expect(page).to have_css(".locale_icon.ru")
end
end
- it "does not show locale flag for primary locale" do
+ it "does not show locale for primary locale" do
within "#post_#{@p.id}" do
- expect(page).not_to have_css("img[src='/assets/refinery/icons/flags/en.png']")
+ expect(page).not_to have_css(".locale_icon.en")
end
end
@@ -292,10 +292,10 @@ module Refinery
visit refinery.blog_admin_posts_path
end
- it "shows both locale flags for post" do
+ it "shows both locales for post" do
within "#post_#{blog_post.id}" do
- expect(page).to have_css("img[src='/assets/refinery/icons/flags/en.png']")
- expect(page).to have_css("img[src='/assets/refinery/icons/flags/ru.png']")
+ expect(page).to have_css(".locale_icon.en")
+ expect(page).to have_css(".locale_icon.ru")
end
end
@@ -303,7 +303,7 @@ module Refinery
it "succeeds" do
within "#post_#{blog_post.id}" do
- click_link("En")
+ click_link("EN")
end
expect(current_path).to eq(refinery.edit_blog_admin_post_path(blog_post))
fill_in "Title", :with => "New Post Title"
@@ -317,7 +317,7 @@ module Refinery
describe "edit the post in secondary locale" do
it "succeeds" do
within "#post_#{blog_post.id}" do
- click_link("ru")
+ click_link("RU")
end
fill_in "Title", :with => "Нов"